Replaced e.message with str(e)

For logging the exception message: e.message has been
deprecated. The preferred way is to call str(e).

Change-Id: If14adfb9eae5fcd95822b07cea3bd66d16dacea2
This commit is contained in:
melissaml 2016-12-01 15:48:14 +08:00
parent a801b0072e
commit e41ab6ec83
2 changed files with 2 additions and 2 deletions

View File

@ -120,5 +120,5 @@ class ChangesService(DatasourceService):
for entity in datasource.get_changes(DatasourceAction.UPDATE):
self.send_to_queue(entity)
except Exception as e:
LOG.error("Get changes Failed - %s", e.message)
LOG.error("Get changes Failed - %s", str(e))
LOG.debug("end get changes")

View File

@ -303,7 +303,7 @@ class TestTopology(BaseTopologyTest):
except ClientException as e:
self.assertEqual(403, e.code)
self.assertEqual(
e.message,
str(e),
"Graph-type 'graph' requires a 'root' with 'depth'")
finally:
self._rollback_to_default()