Write config file only if it doesn't exist

This commit is contained in:
Marcin Kulik
2012-03-17 16:12:21 +01:00
parent a9d69c2c4f
commit 781ad3b089

View File

@@ -408,6 +408,7 @@ def main():
if not os.path.isdir(BASE_DIR):
os.mkdir(BASE_DIR)
if not os.path.exists(cfg_file):
with open(cfg_file, 'wb') as configfile:
config.write(configfile)