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
This commit is contained in:
parent
f804c04d59
commit
a346454c45
|
@ -44,7 +44,7 @@ class OptionsParser:
|
||||||
try:
|
try:
|
||||||
fd = open(self.__filename)
|
fd = open(self.__filename)
|
||||||
except:
|
except:
|
||||||
print "error: cannot open %s\n" % (self.__filename)
|
print "error: cannot open %s for reading\n" % (self.__filename)
|
||||||
return
|
return
|
||||||
|
|
||||||
for line in fd.readlines():
|
for line in fd.readlines():
|
||||||
|
@ -68,7 +68,7 @@ class OptionsParser:
|
||||||
try:
|
try:
|
||||||
fd = open(self.__filename, 'w')
|
fd = open(self.__filename, 'w')
|
||||||
except:
|
except:
|
||||||
print "error: cannot open %s\n" % (self.__filename)
|
print "error: cannot open %s for writing\n" % (self.__filename)
|
||||||
return
|
return
|
||||||
gajim.config.foreach(self.write_line, fd)
|
gajim.config.foreach(self.write_line, fd)
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
|
@ -644,6 +644,9 @@ class Interface:
|
||||||
'statusmsgcolor': gajim.config.get('statusmsgcolor'),
|
'statusmsgcolor': gajim.config.get('statusmsgcolor'),
|
||||||
}
|
}
|
||||||
parser.read()
|
parser.read()
|
||||||
|
|
||||||
|
#create the config
|
||||||
|
self.save_config()
|
||||||
|
|
||||||
for account in gajim.config.get_per('accounts'):
|
for account in gajim.config.get_per('accounts'):
|
||||||
gajim.connections[account] = common.connection.Connection(account)
|
gajim.connections[account] = common.connection.Connection(account)
|
||||||
|
|
Loading…
Reference in New Issue