Skip to content

Commit

Permalink
fix exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrtye committed Mar 21, 2024
1 parent 7bbe3d6 commit 609c0ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions submanager/update_nginx_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ def update_nginx_config(credentials):


def update():
credentials = get_credentials()
try:
credentials = get_credentials()

if credentials is None:
raise Exception("No credentials available")
if credentials is None:
raise Exception("No credentials available")

update_nginx_config(credentials)
update_nginx_config(credentials)

except Exception as e:
print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), str(e))


if __name__ == "__main__":
Expand Down

0 comments on commit 609c0ad

Please sign in to comment.