Commit 6e2b363c authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Make ntpq die gracefully is the ntp library can't be found

parent 80de2d33
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment