[X2Go-Commits] [python-x2go] 01/01: test if DISPLAY is accessible before detecting the local desktop geometry

git-admin at x2go.org git-admin at x2go.org
Wed Sep 10 09:58:23 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository python-x2go.

commit f308782c93a8dfa1ea87898f84a5c8b3cf59f516
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Sep 10 09:57:26 2014 +0200

    test if DISPLAY is accessible before detecting the local desktop geometry
---
 x2go/utils.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/x2go/utils.py b/x2go/utils.py
index 44a0e5a..7196271 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -662,8 +662,9 @@ def get_desktop_geometry():
     """
     if _X2GOCLIENT_OS != 'Windows':
         display = _X_DISPLAY
-        root = display.screen().root
-        return (root.get_geometry().width, root.get_geometry().height)
+        if display:
+            root = display.screen().root
+            return (root.get_geometry().width, root.get_geometry().height)
 
     return None
 

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list