[X2Go-Commits] [python-x2go] 02/02: x2go/session.py: Avoid variable name collisions in nested exception catching.
git-admin at x2go.org
git-admin at x2go.org
Thu Oct 26 01:19:42 CEST 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository python-x2go.
commit d3b6389d1433ccf57ebb11dbe228fd638bba62e8
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu Oct 26 01:19:33 2017 +0200
x2go/session.py: Avoid variable name collisions in nested exception catching.
---
x2go/session.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/x2go/session.py b/x2go/session.py
index 95ee15d..2f79014 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1599,13 +1599,14 @@ class X2GoSession(object):
self.logger('status update interval too short (%s), skipping status update this time...' % _status_update_timedelta, loglevel=log.loglevel_DEBUG)
return False
- e = None
+ err = None
self._last_status = copy.deepcopy(self._current_status)
if session_list is None:
try:
session_list = self.control_session.list_sessions()
self.connected = True
except x2go_exceptions.X2GoControlSessionException as e:
+ err = e
self.connected = False
self.running = None
self.suspended = None
@@ -1623,6 +1624,7 @@ class X2GoSession(object):
else:
self.terminated = None
except KeyError as e:
+ err = e
self.running = False
self.suspended = False
if not self.virgin:
@@ -1640,8 +1642,8 @@ class X2GoSession(object):
'faulty': self.faulty,
}
- if (not self.connected or self.faulty) and e:
- raise e
+ if (not self.connected or self.faulty) and err:
+ raise err
return True
__update_status = update_status
--
Alioth's /srv/git/code.x2go.org/python-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
More information about the x2go-commits
mailing list