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:
parent
c189feeb8b
commit
6cba31c0dd
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue