From 6ed045731ca424e50b8829fa8528b308fa67b69c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 11 Mar 2020 01:49:07 +0100 Subject: [PATCH] [PATCH] pyhoca/cli/frontend.py: Fix reference before assignment error in resume_session() method. Thanks to Randy Goldenberg for spotting this. (Fixes: #1445). Gbp-Pq: Name 0001_pyhoca-cli-frontend.py-Fix-reference-before-assignme.patch --- pyhoca/cli/frontend.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py index e970dca..7551838 100644 --- a/pyhoca/cli/frontend.py +++ b/pyhoca/cli/frontend.py @@ -226,8 +226,7 @@ class PyHocaCLI(x2go.X2GoClient): """ # resume a running session self.logger('resuming X2Go session: %s' % self.args.resume, loglevel=x2go.loglevel_INFO, ) - if available_sessions is None: - available_sessions = self._X2GoClient__list_sessions(s_hash) + available_sessions = self._X2GoClient__list_sessions(s_hash) if available_sessions and self.args.resume == 'OLDEST': self._auto_resume_oldest(s_hash) elif available_sessions and self.args.resume == 'NEWEST':