[Git][NTPsec/ntpsec][master] 2 commits: Fix undefined variable in __dopeers() error message
Matt Selsky
gitlab at mg.gitlab.com
Mon Jan 2 18:32:13 UTC 2017
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
8d17701d by Matt Selsky at 2017-01-02T13:30:44-05:00
Fix undefined variable in __dopeers() error message
NameError: global name 'associd' is not defined
Found using pyflakes:
ntpclients/ntpq:311: undefined name 'associd'
- - - - -
51c9bf12 by Matt Selsky at 2017-01-02T13:30:44-05:00
Remove unused variables
Found via pyflakes
ntpclients/ntpq:250: local variable 'condition' is assigned to but never used
ntpclients/ntpq:956: local variable 'varlist' is assigned to but never used
- - - - -
1 changed file:
- ntpclients/ntpq
Changes:
=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -247,7 +247,6 @@ usage: help [ command ]
return True
def __printassoc(self, showall):
- condition = ""
if not self.peers:
self.say("No association IDs in list\n")
return
@@ -308,7 +307,7 @@ usage: help [ command ]
if len(self.chosts) > 1:
self.warn("server=%s " % self.session.hostname)
self.warn("***No information returned for association %d\n" \
- % associd)
+ % peer.associd)
continue
if len(self.chosts) > 1:
self.say(ntp.util.PeerSummary.high_truncate(self.session.hostname, maxhostlen)+ " ")
@@ -953,7 +952,6 @@ usage: writevar assocID name=value,[...]
idrange = self.__assoc_range_valid(line)
if not idrange:
return
- varlist = line.split()[2:]
for associd in idrange:
if (associd != idrange[0]):
self.say("\n")
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c999277c49a8edccab932c119f30e771cb14e6c1...51c9bf1212859405c67b72a61edc4808e11e5da5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170102/1a4f7bf8/attachment.html>
More information about the vc
mailing list