diff --git a/tools/get_ntp.py b/tools/get_ntp.py index a362400..df37ace 100755 --- a/tools/get_ntp.py +++ b/tools/get_ntp.py @@ -6,5 +6,8 @@ c = ntplib.NTPClient() try: response = c.request(sys.argv[1]) print(ctime(response.tx_time)) -except: - print("ERROR") +except ntplib.NTPException as e: + print(f"ERROR during NTP request: {e}") + print("Usage: ntp-client.py ") + sys.exit(-1) +