Skip to content

Commit

Permalink
handle KeyboardInterrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-oleynik committed Aug 20, 2024
1 parent 2eab8f4 commit 15c1420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metrics-pusher/metrics-pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def push_metrics(
)
except Exception as e:
traceback.print_exception(e)
except KeyboardInterrupt:
break


def push_container_metrics(
Expand Down Expand Up @@ -81,6 +83,8 @@ def auth_handler(url, method, timeout, headers, data):
)
except Exception as e:
traceback.print_exception(e)
except KeyboardInterrupt:
break


if __name__ == "__main__":
Expand Down

0 comments on commit 15c1420

Please sign in to comment.