automatically add 'highlight' to config after upgrade from earlier version #16

This commit is contained in:
Stephan Gabler 2012-04-24 22:04:53 +02:00
parent 526ee009e8
commit 530514c7ac

View file

@ -357,6 +357,10 @@ if __name__ == "__main__":
else: else:
with open(CONFIG_PATH) as f: with open(CONFIG_PATH) as f:
config = json.load(f) config = json.load(f)
if not 'highlight' in config:
config['highlight'] = False
with open(CONFIG_PATH, 'w') as f:
json.dump(config, f, indent=2)
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
composing = parser.add_argument_group('Composing', 'Will make an entry out of whatever follows as arguments') composing = parser.add_argument_group('Composing', 'Will make an entry out of whatever follows as arguments')