[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
This commit is contained in:
Mike Gabriel 2020-03-11 01:49:07 +01:00 committed by zhouganqing
parent 6b67e58e7c
commit 6ed045731c
1 changed files with 1 additions and 2 deletions

View File

@ -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':