Sanitize dict key

This commit is contained in:
Alexis Gavoty 2013-06-02 21:34:11 +03:00
parent 1d052ab5c3
commit 44ed6c8b4d

View file

@ -139,6 +139,7 @@ def parse_dict(action_map):
if 'dest' in arg_params: name = arg_params['dest'] if 'dest' in arg_params: name = arg_params['dest']
elif arg_fullname: name = arg_fullname[2:] elif arg_fullname: name = arg_fullname[2:]
else: name = arg_name else: name = arg_name
name = name.replace('-', '_')
patterns[name] = arg_params['pattern'] patterns[name] = arg_params['pattern']
del arg_params['pattern'] del arg_params['pattern']