From 6e29a8b5244854d4e1f1703f68f4da8e0114363f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Tue, 23 Aug 2005 09:17:48 +0000 Subject: [PATCH] create config file with 0600 [and remove \n from print!!!!! --- src/common/optparser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/optparser.py b/src/common/optparser.py index 1b82aeaa6..a235db1ea 100644 --- a/src/common/optparser.py +++ b/src/common/optparser.py @@ -2,7 +2,7 @@ ## Gajim Team: ## - Yann Le Boulanger ## - Vincent Hanquez -## - Nikos Kouremenos +## - Nikos Kouremenos ## ## Copyright (C) 2003-2005 Gajim Team ## @@ -47,8 +47,8 @@ class OptionsParser: fd = open(self.__filename) except: if os.path.exists(self.__filename): - #it is file about file - print _('error: cannot open %s for reading\n') % self.__filename + #it is file about file FIXME: bad comment + print _('error: cannot open %s for reading') % self.__filename return for line in fd.readlines(): @@ -74,10 +74,11 @@ class OptionsParser: try: fd = open(self.__tempfile, 'w') except: - #we cannot write file in a directory - err_str = _('Unable to write file in %s\n') % base_dir + #chances are we cannot write file in a directory + err_str = _('Unable to write file in %s') % base_dir print err_str return err_str + os.chmod(self.__filename, 0600) try: gajim.config.foreach(self.write_line, fd) except IOError, e: