Skip to content

Commit

Permalink
Merge pull request #25 from zhmcclient/juergen/exc_in_exc
Browse files Browse the repository at this point in the history
Avoid exception in exception handling
  • Loading branch information
leopoldjuergen committed Aug 16, 2019
2 parents fa9bd39 + b212689 commit 8e78cc6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@
Change log
----------

Version 0.4.0
^^^^^^^^^^^^^

Released: xxxx-xx-xx

**Bug fixes:**
- Avoid exception in case of a connection drop error handling.

**Known issues:** See the `list of open issues`_.

.. _list of open issues: https://github.com/zhmcclient/zhmc-prometheus-exporter/issue



Version 0.3.0
^^^^^^^^^^^^^

Expand Down
4 changes: 3 additions & 1 deletion zhmc_prometheus_exporter/zhmc_prometheus_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ def collect(self):
retrieved_metrics = retrieve_metrics(self.context)
except zhmcclient.HTTPError as exc:
if exc.http_status == 404 and exc.reason == 1:
delete_metrics_context(self.session, self.context)
# Disable this line because it leads sometimes to
# an exception within the exception handling.
# delete_metrics_context(self.session, self.context)
self.session = create_session(self.yaml_creds)
self.context = create_metrics_context(self.session,
self.yaml_metric_groups,
Expand Down

0 comments on commit 8e78cc6

Please sign in to comment.