[orca] Gracefully handle app going defunct on us
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Gracefully handle app going defunct on us
- Date: Mon, 9 Sep 2019 12:03:06 +0000 (UTC)
commit e8cfb48d96e35b2651e4ae8dffaa7ee65d0b9c14
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Sep 9 14:02:49 2019 +0200
Gracefully handle app going defunct on us
src/orca/script_utilities.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 7a41b7c31..cee9d87e1 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -128,7 +128,12 @@ class Utilities:
if not app:
return ""
- pid = app.get_process_id()
+ try:
+ pid = app.get_process_id()
+ except:
+ msg = "ERROR: Exception getting process id of %s. May be defunct." % app
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return ""
try:
cmdline = subprocess.getoutput("cat /proc/%s/cmdline" % pid)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]