[X2Go-Commits] [x2goclient] 54/74: ~When --list-profiles is invoked: Don't crash if a session profile backend does not rely on config files. Show the session broker URL if a broker session profile backend is in use.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:05:49 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.5.0.1
in repository x2goclient.
commit 70c61ab4a089eaa7a7795b86cf7c18ecedeb1a95
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Mar 17 13:47:27 2014 +0100
~When --list-profiles is invoked: Don't crash if a session profile backend does not rely on config files. Show the session broker URL if a broker session profile backend is in use.
---
debian/changelog | 3 +++
pyhoca/cli/frontend.py | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e5a6f3a1..524489d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ pyhoca-cli (0.5.0.0-0x2go1) UNRELEASED; urgency=low
- If a user name can neither be detected from the session profile, nor
from the command line option, try the username used for the broker
authentication.
+ - When --list-profiles is invoked: Don't crash if a session profile
+ backend does not rely on config files. Show the session broker URL
+ if a broker session profile backend is in use.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Mon, 10 Mar 2014 15:56:42 +0100
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index d6481967..1a49cf8d 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -333,7 +333,7 @@ class PyHocaCLI(x2go.X2GoClient):
# initialize the X2GoClient context and start the connection to the X2Go server
self._pyhoca_logger('preparing requested X2Go session', loglevel=x2go.loglevel_NOTICE, )
- x2go.X2GoClient.__init__(self, broker_url=self.args.broker_url, logger=liblogger)
+ x2go.X2GoClient.__init__(self, broker_url=self.args.broker_url, broker_password=self.args.broker_password, logger=liblogger)
_profiles = self._X2GoClient__get_profiles()
if self.args.session_profile and not _profiles.has_profile(self.args.session_profile):
@@ -349,10 +349,12 @@ class PyHocaCLI(x2go.X2GoClient):
print
print "Available X2Go session profiles"
print "==============================="
- if _session_profiles.config_files is not None:
+ if hasattr(_session_profiles, 'config_files') and _session_profiles.config_files is not None:
print "configuration files: %s" % _session_profiles.config_files
- if _session_profiles.user_config_file is not None:
+ if hasattr(_session_profiles, 'user_config_file') and _session_profiles.user_config_file is not None:
print "user configuration file: %s" % _session_profiles.user_config_file
+ if hasattr(_session_profiles, 'broker_url') and _session_profiles.broker_url is not None:
+ print "X2Go Session Broker URL: %s" % _session_profiles.broker_url
print
for _profile_id in _session_profiles.profile_ids:
_profile_config = _session_profiles.get_profile_config(_profile_id)
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list