This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from e84f192 x2gobroker/brokers/inifile_broker.py: Make sure profile['name'] has a fallback if not given in the session profile. new 16f8f43 x2gobroker/brokers/inifile_broker.py: Also check for presence of 'host' and 'sshport'. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: x2gobroker/brokers/inifile_broker.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 16f8f43a3480a5e1ec5c446a826251d96eae1c20 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 1 13:08:27 2018 +0200 x2gobroker/brokers/inifile_broker.py: Also check for presence of 'host' and 'sshport'. --- x2gobroker/brokers/inifile_broker.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/x2gobroker/brokers/inifile_broker.py b/x2gobroker/brokers/inifile_broker.py index cb9ce87..4c5a15d 100644 --- a/x2gobroker/brokers/inifile_broker.py +++ b/x2gobroker/brokers/inifile_broker.py @@ -77,6 +77,19 @@ class X2GoBroker(base.X2GoBroker): for key in list(profile_defaults.keys()): if key not in list(profile.keys()): profile.update({ key: profile_defaults[key] }) + + # obligatory profile keys: + + if 'host' not in profile: + raise x2gobroker.x2gobroker_exceptions.X2GoBrokerProfileException('Session profile ID \'{profile_id}\' lacks \'host\' key; profile is unusable'.format(profile_id=profile_id)) + + if 'name' not in profile: + profile['name'] = profile_id + + if not ('directrdp' in profile and profile['directrdp']): + if 'sshport' not in profile: + profile['sshport'] = 22 + for key in list(profile.keys()): if key.startswith('acl-'): del profile[key] @@ -109,10 +122,6 @@ class X2GoBroker(base.X2GoBroker): else: profile[key].append(host) - # obligatory profile keys: - if 'name' not in profile: - profile['name'] = profile_id - return profile def get_profile_broker(self, profile_id): -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git