diff --git a/code/main.py b/code/main.py index 1c0ffb5..6c42602 100644 --- a/code/main.py +++ b/code/main.py @@ -91,12 +91,15 @@ def set_rtc(): while True: try: return ntptime.settime() - except OSError as e: - if e.errno == 110: + except OSError as err: + print("OS error: {0}".format(err)) + if err.args[0] == 110: time.sleep(2) - except OverflowError as e: - print(e) + except OverflowError as err: + print("OverflowError: {0}".format(err)) time.sleep(2) + except Exception as err: + return print(err) def now(clock):