add main fn

This commit is contained in:
Lucas Schumacher 2023-10-24 16:14:49 -04:00
parent 1dbc78e4de
commit 7cfef77a20

View File

@ -17,7 +17,7 @@ def get_ip():
s.close() s.close()
return IP return IP
if __name__ == "__main__": def main():
ip = get_ip() ip = get_ip()
print("IP:", ip) print("IP:", ip)
try: try:
@ -44,3 +44,6 @@ if __name__ == "__main__":
print("DONE") print("DONE")
while True: while True:
time.sleep(10) time.sleep(10)
if __name__ == "__main__":
main()