[X2Go-Commits] [x2gobroker] 01/01: fix(2) for f2cb22f
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 15 15:22:18 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gobroker.
commit 6941b17333d52e015516c125b341affb63656e9b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Apr 15 15:22:04 2015 +0200
fix(2) for f2cb22f
---
x2gobroker/brokers/base_broker.py | 8 +++++---
x2gobroker/config.py | 7 ++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 9325b8c..bc2a6e5 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -1232,6 +1232,11 @@ class X2GoBroker(object):
if self.check_profile_acls(username, acls):
for key in copy.deepcopy(profile).keys():
+
+ if profile[key] == "not-set":
+ del profile[key]
+ continue
+
if key.startswith('host=') and broker_frontend != 'uccs':
del profile[key]
if key.startswith('sshport=') and broker_frontend != 'uccs':
@@ -1239,9 +1244,6 @@ class X2GoBroker(object):
if key == 'user' and profile[key] == 'BROKER_USER':
profile[key] = unicode(username)
- if profile[key] == "not-set":
- del profile[key]
-
if self.get_session_autologin(profile_id):
profile['autologin'] = True
profile['key'] = u'<will-be-exchanged-during-session-selection>'
diff --git a/x2gobroker/config.py b/x2gobroker/config.py
index 33d4c0c..94bbd75 100644
--- a/x2gobroker/config.py
+++ b/x2gobroker/config.py
@@ -263,7 +263,12 @@ class X2GoBrokerConfigFile(object):
elif key_type is types.IntType:
- return self.iniConfig.getint(section, key)
+ try:
+ return self.iniConfig.getint(section, key)
+ except ValueError:
+ _val = self.iniConfig.get(section, key)
+ if _val != u"not-set": raise
+ else: return _val
elif key_type is types.ListType:
--
Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
More information about the x2go-commits
mailing list