The branch, master has been updated via 3710451867d4f079e6324b7e37ad8c2284c5a99d (commit) from cee0cac37466c9ea792588f0a26f6842d104f8e4 (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 ----------------------------------------------------------------- commit 3710451867d4f079e6324b7e37ad8c2284c5a99d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Jan 11 10:55:31 2013 +0100 Catch any kind of exception when writing session profile files and return True or False in cases where I/O errors occur. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 ++ x2go/inifiles.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 20bd71f..a8da37f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ python-x2go (0.2.1.2-0~x2go1) UNRELEASED; urgency=low [ Mike Gabriel ] * New upstream version (0.2.1.2): - Add session profile option ,,display'' to default session profile options. + - Catch any kind of exception when writing session profile files and return + True or False in cases where I/O errors occur. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 20 Dec 2012 08:58:44 +0100 diff --git a/x2go/inifiles.py b/x2go/inifiles.py index 996cf83..bb27c72 100644 --- a/x2go/inifiles.py +++ b/x2go/inifiles.py @@ -204,12 +204,20 @@ class X2goIniFile(object): For writing the first of the C{config_files} specified on instance construction that is writable will be used. + @return: C{True} if the user config file has been successfully writte, C{False} otherwise. + @rtype: C{bool} + """ if self.user_config_file and self.write_user_config: - fd = open(self.user_config_file, 'wb') - self.iniConfig.write(fd) - fd.close() - self.write_user_config = False + try: + fd = open(self.user_config_file, 'wb') + self.iniConfig.write(fd) + fd.close() + self.write_user_config = False + return True + except: + pass + return False def get_type(self, section, key): """\ 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).