File: detect-session.patch

package info (click to toggle)
dogtail 1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: python: 6,124; makefile: 56; sh: 7
file content (27 lines) | stat: -rw-r--r-- 755 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Forwarded: https://gitlab.com/dogtail/dogtail/issues/7

---
 scripts/dogtail-detect-session |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/scripts/dogtail-detect-session
+++ b/scripts/dogtail-detect-session
@@ -43,7 +43,7 @@ def GNOME():
         print("GNOME Session detected.")
 
     except (AttributeError or AssertionError or FocusError):
-        print("ERROR: No session found.")
+        print("ERROR: No GNOME session found.")
 
     return running
 
@@ -59,8 +59,7 @@ def JustSomeApps():
     "Is at least one accessibility-enabled application running?"
     """
 
-    assert focus.desktop
-    assert focus.desktop.children
+    return focus.desktop and focus.desktop.children
 
 
 if GNOME() or KDE() or JustSomeApps():