Fix initial config creation
This commit is contained in:
1 parent
0adb07d75b
commit
ed229ac7c7
1 file changed
+2
-2
@@ -178,7 +178,7 @@ class Frontend:
|
||||
def on_destroy(self, widget, data=None):
|
||||
Gtk.main_quit()
|
||||
|
||||
def create_config(cfgfile):
|
||||
def create_config(cfg, cfgfile):
|
||||
# create inital config file
|
||||
with open(cfgfile, 'w') as fh:
|
||||
fh.write('[DB]\n')
|
||||
@@ -207,7 +207,7 @@ if __name__ == "__main__":
|
||||
config = configparser.ConfigParser()
|
||||
cfgfile = os.path.expanduser(context.cfg['cfgfile'])
|
||||
if not config.read(cfgfile):
|
||||
create_config(cfgfile)
|
||||
create_config(context.cfg, cfgfile)
|
||||
gtkutils.messagebox(
|
||||
_("Configuration file '{}' not found.\n"
|
||||
"Default configuration has been created.\n"
|
||||
|
||||
Reference in new issue
Block a user