summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/ping.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 924a889db..610f6a05d 100755
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -220,6 +220,8 @@ if __name__ == '__main__':
try:
ip = socket.gethostbyname(host)
+ except UnicodeError:
+ sys.exit(f'ping: Unknown host: {host}')
except socket.gaierror:
ip = host