Add NetworkManager SecretAgent constants

Update makeconstants.py, update contsants in NetworkManager,py
Fix error in attribute setting
Narrow down types of exceptions which are handled

Handle only KeyError exception, because this is the only type of
exception expected.