Fix error handling (chatGPT is dumb)
This commit is contained in:
parent
0f044a1de7
commit
6e0b9da3b3
5
main.py
5
main.py
|
@ -25,9 +25,8 @@ def main(address, password):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
password = os.environ["FRITZ_PASSWORD"]
|
||||
except KeyError:
|
||||
password = os.environ["FRITZ_PASSWORD"]
|
||||
if password is None or password == "":
|
||||
print("Error: FRITZ_PASSWORD environment variable not set.")
|
||||
exit(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue