diff --git a/getIPaddress.py b/getIPaddress.py index 6694e27..a289150 100755 --- a/getIPaddress.py +++ b/getIPaddress.py @@ -34,6 +34,6 @@ try: getPublicIP(ipv4=ipv==4, verbose=args.verbose) except RuntimeError as e: - print(e.args[0]) + print('[ERROR]:', e) # end try -# end if \ No newline at end of file +# end if diff --git a/update-record.py b/update-record.py index b4a0260..a2ee7ab 100755 --- a/update-record.py +++ b/update-record.py @@ -158,13 +158,13 @@ try: main(args) except RuntimeError as e: - print(e.args[0]) + print('[ERROR]:', e) sys.exit(os.EX_SOFTWARE) except (NameError, ValueError) as e: - print(e.args[0]) + print('[ERROR]:', e) sys.exit(os.EX_DATAERR) - except TimeoutError as e: - print('Timeout:', e) + except (TimeoutError, ConnectionError) as e: + print('[Connection ERROR]:', e) sys.exit(os.EX_SOFTWARE) # end try # end if