Adjust error handling for missing prometheus endpoint: error is logged not raised

This commit is contained in:
Julius Unverfehrt 2022-03-22 15:38:15 +01:00
parent 1b1da50faf
commit 004c5fa805
2 changed files with 8 additions and 9 deletions

View File

@ -7,14 +7,13 @@ from pyinfra.locations import CONFIG_FILE
def make_art(): def make_art():
return """ return """
______ _____ __ ___ _ _ ___ __
| ___ \ |_ _| / _| o O O | _ \ | || | |_ _| _ _ / _| _ _ __ _
| |_/ / _ | | _ __ | |_ _ __ __ _ o | _/ \_, | | | | ' \ | _| | '_| / _` |
| __/ | | || || '_ \| _| '__/ _` | TS__[O] _|_|_ _|__/ |___| |_||_| _|_|_ _|_|_ \__,_|
| | | |_| || || | | | | | | | (_| | {======|_| ``` |_| ````|_|`````|_|`````|_|`````|_|`````|_|`````|
\_| \__, \___/_| |_|_| |_| \__,_| ./o--000' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-'
__/ |
|___/
""" """

View File

@ -58,7 +58,7 @@ def set_up_probing_webserver():
logger.warning(f"Got no metrics from analysis prometheus endpoint: {err}") logger.warning(f"Got no metrics from analysis prometheus endpoint: {err}")
informed_about_missing_prometheus_endpoint = True informed_about_missing_prometheus_endpoint = True
else: else:
raise err logging.warning(f"Caught {err}")
return resp.text return resp.text
return app return app