Fix error handling (chatGPT is dumb)

This commit is contained in:
qvalentin 2023-12-09 13:04:50 +01:00
parent 0f044a1de7
commit 6e0b9da3b3
1 changed files with 2 additions and 3 deletions

View File

@ -25,9 +25,8 @@ def main(address, password):
if __name__ == "__main__": if __name__ == "__main__":
try: password = os.environ["FRITZ_PASSWORD"]
password = os.environ["FRITZ_PASSWORD"] if password is None or password == "":
except KeyError:
print("Error: FRITZ_PASSWORD environment variable not set.") print("Error: FRITZ_PASSWORD environment variable not set.")
exit(1) exit(1)