summaryrefslogtreecommitdiff
path: root/src/op_mode/ping.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode/ping.py')
-rwxr-xr-xsrc/op_mode/ping.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 924a889db..2144ab53c 100755
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -51,7 +51,7 @@ options = {
'help': 'Number of seconds before ping exits'
},
'do-not-fragment': {
- 'ping': '{command} -M dont',
+ 'ping': '{command} -M do',
'type': 'noarg',
'help': 'Set DF-bit flag to 1 for no fragmentation'
},
@@ -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