Fix error handling (chatGPT is dumb)
This commit is contained in:
parent
0f044a1de7
commit
6e0b9da3b3
3
main.py
3
main.py
|
@ -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"]
|
||||||
except KeyError:
|
if password is None or password == "":
|
||||||
print("Error: FRITZ_PASSWORD environment variable not set.")
|
print("Error: FRITZ_PASSWORD environment variable not set.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue