Skip to content

Commit

Permalink
Fix #9 automatic_rename_kit_nodes in config
Browse files Browse the repository at this point in the history
  • Loading branch information
blavka committed Feb 28, 2019
1 parent e9e9c92 commit ca97cc9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bcg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
'base_topic_prefix': '', # ie. 'bigclown-'
'automatic_remove_kit_from_names': True,
'automatic_rename_kit_nodes': True,
'automatic_rename_generic_nodes': True,
'automatic_rename_nodes': True,
'rename': {}
Expand All @@ -37,9 +38,10 @@ def port_range(port):
Optional('keyfile'): And(str, len, os.path.exists),
},
Optional('base_topic_prefix'): str, # ie. 'bigclown-'
Optional('automatic_remove_kit_from_names'): bool,
Optional('automatic_rename_generic_nodes'): bool,
Optional('automatic_rename_nodes'): bool,
Optional('automatic_remove_kit_from_names'): Use(bool),
Optional('automatic_rename_kit_nodes'): Use(bool),
Optional('automatic_rename_generic_nodes'): Use(bool),
Optional('automatic_rename_nodes'): Use(bool),
Optional('rename'): {}
})

Expand All @@ -50,10 +52,7 @@ def load_config(config_file):
try:
config = schema.validate(config)
except SchemaError as e:
# Better error format
error = str(e).splitlines()
del error[1]
raise Exception(' '.join(error))
raise Exception('Load Config: ' + str(e))

elif config_file is None:
config = {}
Expand Down

0 comments on commit ca97cc9

Please sign in to comment.