Skip to content

Commit

Permalink
Merge pull request #24 from micado-scale/devel
Browse files Browse the repository at this point in the history
fix(py3): fix issue with logging exceptions
  • Loading branch information
jaydesl authored Feb 21, 2022
2 parents f2b5d44 + 5f8dc2f commit 8c0e4e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handle_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def evaluate_data_queries_and_alerts_for_nodes(endpoint,policy,node):
except Exception as e:
policy['data']['query_results'][param]=None
queries[param]=None
log.warning('Evaluating expression for query "{0}" failed: {1}'.format(param,e.message))
log.warning('Evaluating expression for query "{0}" failed: {1}'.format(param,e))
policy['data']['alert_results']={}
for item in policy.get('data',dict()).get('alerts',dict()):
attrname = item['alert']
Expand Down Expand Up @@ -123,7 +123,7 @@ def evaluate_data_queries_and_alerts_for_a_service(endpoint,policy,servicename):
except Exception as e:
policy['data']['query_results'][param]=None
queries[param]=None
log.warning('Evaluating expression for query "{0}" failed: {1}'.format(param,e.message))
log.warning('Evaluating expression for query "{0}" failed: {1}'.format(param,e))
policy['data']['alert_results']={}
for item in policy.get('data',dict()).get('alerts',dict()):
attrname = item['alert']
Expand Down

0 comments on commit 8c0e4e8

Please sign in to comment.