[X2Go-Commits] python-x2go.git - brokerclient (branch) updated: 0.2.0.10-59-gb94f818

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:21:30 CET 2014


The branch, brokerclient has been updated
       via  b94f81857a38691d156a39338bbe3e139c95433e (commit)
      from  66b5505d45f44e1b9a76c33015fdd7543c12310f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    2 ++
 x2go/utils.py    |   18 +++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 93ead3c..4d5b871 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ python-x2go (0.2.1.0-0~x2go1) UNRELEASED; urgency=low
       forwarding tunneling support in the server's SSH daemon.
     - Fall back to password auth if agent auth and key discovery fail.
     - Give the session window more time to appear.
+    - Catch rare condition in utils.find_session_window in case where
+      the list of window IDs is not available.
   * /debian/rules:
     + Allow package build on systems with missing dh_python2.
   * /debian/control:
diff --git a/x2go/utils.py b/x2go/utils.py
index 637b4f2..c032248 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -585,13 +585,17 @@ def find_session_window(session_name):
         root = display.screen().root
 
         success = False
-        windowIDs = root.get_full_property(display.intern_atom('_NET_CLIENT_LIST'), Xlib.X.AnyPropertyType).value
-        for windowID in windowIDs:
-            window = display.create_resource_object('window', windowID)
-            name = window.get_wm_name()
-            if name is not None and session_name in name:
-                success = True
-                break
+        windowIDs_obj = root.get_full_property(display.intern_atom('_NET_CLIENT_LIST'), Xlib.X.AnyPropertyType)
+
+        if windowIDs_obj not None:
+            windowIDs = windowIDs_obj.value
+
+            for windowID in windowIDs:
+                window = display.create_resource_object('window', windowID)
+                name = window.get_wm_name()
+                if name is not None and session_name in name:
+                    success = True
+                    break
 
         if success:
             return window


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list