Skip to content
Snippets Groups Projects
Commit def1f112 authored by Matt Selsky's avatar Matt Selsky
Browse files

Python3: Fix mixed tabs/spaces in ntpdig

parent 9e25052b
No related branches found
No related tags found
Loading
......@@ -388,15 +388,15 @@ if __name__ == '__main__':
print("rec-org t21: %f xmt-dst t34: %f" % (pkt.t2() - pkt.t1(), pkt.t3() - pkt.t4()))
adjusted = step and (not slew or (slew and (abs(offset) > steplimit)))
report(pkt, json)
# If we can step but we cannot slew, then step.
# If we can step or slew and |offset| > steplimit, then step.
# If we can step but we cannot slew, then step.
# If we can step or slew and |offset| > steplimit, then step.
rc = True
offset = pkt.adjust()
ntp.ntpc.setprogname("ntpdig")
if adjusted:
rc = ntp.ntpc.step_systime(offset)
elif slew:
rc = ntp.ntpc.adj_systime(offset)
rc = ntp.ntpc.step_systime(offset)
elif slew:
rc = ntp.ntpc.adj_systime(offset)
if rc:
raise SystemExit(0)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment