Skip to content

Commit

Permalink
adds try/except to catch HTTP 401 response
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Dec 19, 2023
1 parent c215342 commit 9d57e11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions host_parent/bin/host_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@
wato.edit_host(host, etag=etag, unset_attr=['parents'])
changes = True
if changes:
wato.activate()

try:
wato.activate()
except checkmkapi.requests.exceptions.HTTPError as er:
resp = er.response
if resp.status_code != 401:
raise
Binary file removed host_parent/host_parent-0.3.0.mkp
Binary file not shown.
Binary file added host_parent/host_parent-0.3.2.mkp
Binary file not shown.

0 comments on commit 9d57e11

Please sign in to comment.