[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.4.0.6-8-gffff661

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:31:35 CET 2014


The branch, build-baikal has been updated
       via  ffff661e874d1f2303c3c90d5be3f972d6fba4fd (commit)
      from  3847b19e083afc177aa06ac45f5421899d0032c6 (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:
 debian/changelog                |    1 +
 x2go/backends/profiles/_file.py |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 3e6191f..9132ba8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ python-x2go (0.4.0.7-0~x2go1) UNRELEASED; urgency=low
     - Make _update_mounts in session registry cache more failsafe, this probably
       fixes an accumulation of server disconnects observed in recent version of
       Python X2Go.
+    - Add some sanity checks before actually starting to add a session profile.
   * /debian/control:
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
 
diff --git a/x2go/backends/profiles/_file.py b/x2go/backends/profiles/_file.py
index 8c70820..0b9eedb 100644
--- a/x2go/backends/profiles/_file.py
+++ b/x2go/backends/profiles/_file.py
@@ -359,9 +359,15 @@ class X2GoSessionProfilesFILE(inifiles.X2GoIniFile):
         @rtype: C{str}
 
         """
-        if profile_id is None:
+        if profile_id is None or profile_id in self.profile_ids:
             profile_id = utils._genSessionProfileId()
 
+        if 'name' not in kwargs.keys():
+            raise X2GoProfileException('session profile parameter ,,name\'\' is missing in method parameters')
+
+        if kwargs['name'] in self.profile_names:
+            raise X2GoProfileException('a profile of name ,,%s\'\' already exists' % kwargs['name'])
+
         for key, value in kwargs.items():
             self.update_value(None, key, value, profile_id=profile_id)
 


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