Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
NTPsec
ntpsec
Commits
6e2b363c
Commit
6e2b363c
authored
Nov 07, 2016
by
Eric S. Raymond
Browse files
Make ntpq die gracefully is the ntp library can't be found
parent
80de2d33
Changes
1
Hide whitespace changes
Inline
Side-by-side
ntpq/ntpq
View file @
6e2b363c
...
...
@@ -14,10 +14,14 @@ from __future__ import print_function, division
import
os
,
sys
,
getopt
,
cmd
,
re
import
socket
,
hashlib
from
ntp.packet
import
*
from
ntp.util
import
*
from
ntp.ntpc
import
*
import
ntp.version
try
:
from
ntp.packet
import
*
from
ntp.util
import
*
from
ntp.ntpc
import
*
import
ntp.version
except
ImportError
:
sys
.
stderr
.
write
(
"ntpq: can't find the Python NTP library -- bailing out.
\n
"
)
sys
.
exit
(
1
)
# This import only works on Unixes. The intention is to enable
# Ctrl-P, Ctrl-N, and friends in Cmd.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment