Replaced e.message with str(e)

For logging the exception message: e.message has been
deprecated. The preferred way is to call str(e).
More details: https://www.python.org/dev/peps/pep-0352/

Change-Id: I27b6a7b1f5e336df3cd618684cedfd01c840c99f
This commit is contained in:
Cao Xuan Hoang 2017-01-16 14:37:48 +07:00
parent c189feeb8b
commit 6cba31c0dd
1 changed files with 1 additions and 2 deletions

View File

@ -48,8 +48,7 @@ class InsertComponent(Component):
metric_validator.validate(metric["metric"])
except Exception as e:
log.info("Metric %s is invalid: Exception : %s"
% (json.dumps(metric),
e.message))
% (json.dumps(metric), str(e)))
return False
return True