I'm working in master configuration_manager.py and in particular the sms function.
I want do get rid of a few warning I get from my ide about the exceptions being to broad, (I think it's right by the way) as it might hide other faults and error that should be caught else where.
I have 4 warnings
the first is at
# Commands
_SMS_CONFIG['commands'] = _as_list(_SMS_CONFIG['commands'])
for cmd in _SMS_CONFIG['commands']:
try:
_SMS_CONFIG[cmd + '_aliases'] = _as_list(_SMS_CONFIG[cmd + '_aliases'])
except:
_SMS_CONFIG[cmd + '_aliases'] = []
except: what?
All I can think of is _as_list has an error which should be caught and handled in _as_list or SMS_CONFIG[cmd + '_aliases'] is a KeyError. Can anybody think of any other error that applies (testing for every situation is not an easy thing)? I know that Todd and Christ have the most experience with this, so maybe you guys remember why you used a try/except blocks. Second and third are the same thing for the most part.
The fourth is related to thorttle_group_definitions (or thorttlegroupdefinitions I am re factoring and don't remember the starting names). I have not look into this one yet, but if anyone has any insight to save me alot of time, I would be most appreciative to not have to work thought this step by step and then wonder if I was right.