[Git][NTPsec/ntpsec][master] ntpdig: fix use before set found by pyflakes.

Gary E. Miller gitlab at mg.gitlab.com
Tue Jan 3 04:45:40 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
eba7af59 by Gary E. Miller at 2017-01-02T20:45:15-08:00
ntpdig: fix use before set found by pyflakes.

- - - - -


1 changed file:

- ntpclients/ntpdig


Changes:

=====================================
ntpclients/ntpdig
=====================================
--- a/ntpclients/ntpdig
+++ b/ntpclients/ntpdig
@@ -407,13 +407,12 @@ if __name__ == '__main__':
             print("xmt t3: %f dst t4: %f" % (pkt.t3(), pkt.t4()))
             print("rec-org t21: %f  xmt-dst t34: %f"
                   % (pkt.t2() - pkt.t1(), pkt.t3() - pkt.t4()))
-        # FIXME!! offset used before defined. 
+        offset = pkt.adjust()
         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.
         rc = True
-        offset = pkt.adjust()
         ntp.ntpc.setprogname("ntpdig")
         if adjusted:
             rc = ntp.ntpc.step_systime(offset)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/eba7af593fc0804e318cff6d25a411742c9cbe7a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170103/20fab552/attachment.html>


More information about the vc mailing list