[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.2.1.1-26-g9a9712d
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:31:28 CET 2014
The branch, build-baikal has been updated
via 9a9712d918b999c87c2ff01b07b0526c3a855835 (commit)
from 42b3141237a11af183bc4e682292c7b49f408460 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2go/backends/profiles/_file.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
The diff of changes is:
diff --git a/x2go/backends/profiles/_file.py b/x2go/backends/profiles/_file.py
index 3c60ec2..e5f1432 100644
--- a/x2go/backends/profiles/_file.py
+++ b/x2go/backends/profiles/_file.py
@@ -148,14 +148,14 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
def write(self):
-
# then update profile IDs for profiles that have a renamed host attribute...
for profile_id in self._profiles_need_profile_id_renewal:
_config = self.get_profile_config(profile_id=profile_id)
self.iniConfig.remove_section(profile_id)
try: self._cached_profile_ids.remove(profile_id)
except ValueError: pass
- self._cached_profile_ids.append(self.add_profile(profile_id=None, **_config))
+ self.add_profile(profile_id=None, **_config)
+ self._cached_profile_names = []
self._profiles_need_profile_id_renewal = []
# at last write the profile config as is...
@@ -360,6 +360,7 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
"""
if profile_id is None:
profile_id = utils._genSessionProfileId()
+
for key, value in kwargs.items():
self.update_value(None, key, value, profile_id=profile_id)
@@ -402,6 +403,9 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
profile_id = profile_id or self.check_profile_id_or_name(section)
except X2GoProfileException:
profile_id = section
+
+ inifiles.X2GoIniFile.update_value(self, profile_id, key, value)
+
if key == 'name':
profile_name = value
current_profile_name = self.get_value(profile_id, key)
@@ -409,7 +413,7 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
raise X2GoProfileException('profile name for profile id %s may not be empty' % profile_id)
else:
if profile_name != current_profile_name and profile_name in self.profile_names:
- raise X2GoProfileException('a profile of name ,,%s'' already exists' % profile_name)
+ raise X2GoProfileException('a profile of name ,,%s\'\' already exists' % profile_name)
self._cached_profile_names = []
if key == 'export' and type(value) == types.DictType:
@@ -425,8 +429,6 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
if _config.has_key('host') and _config['host'] != value:
self._profiles_need_profile_id_renewal.append(profile_id)
- inifiles.X2GoIniFile.update_value(self, profile_id, key, value)
-
def check_profile_id_or_name(self, profile_id_or_name):
"""\
Detect the profile ID from a given string which maybe profile ID or profile name.
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list