From a346454c451e6567eb22369bd852a428db157d05 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 5 May 2005 17:11:48 +0000 Subject: [PATCH] make gajim bootable if not config available. this code is temp but seems to fixes the pb. plz hack it so it meats your taste --- src/common/optparser.py | 4 ++-- src/gajim.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/optparser.py b/src/common/optparser.py index 816c94162..d73c76e70 100644 --- a/src/common/optparser.py +++ b/src/common/optparser.py @@ -44,7 +44,7 @@ class OptionsParser: try: fd = open(self.__filename) except: - print "error: cannot open %s\n" % (self.__filename) + print "error: cannot open %s for reading\n" % (self.__filename) return for line in fd.readlines(): @@ -68,7 +68,7 @@ class OptionsParser: try: fd = open(self.__filename, 'w') except: - print "error: cannot open %s\n" % (self.__filename) + print "error: cannot open %s for writing\n" % (self.__filename) return gajim.config.foreach(self.write_line, fd) fd.close() diff --git a/src/gajim.py b/src/gajim.py index 6daf320d8..fb8e21f84 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -644,6 +644,9 @@ class Interface: 'statusmsgcolor': gajim.config.get('statusmsgcolor'), } parser.read() + + #create the config + self.save_config() for account in gajim.config.get_per('accounts'): gajim.connections[account] = common.connection.Connection(account)