python exception handling

provide default value if json attribute has not been set