[Git][NTPsec/ntpsec][master] Fix typos in debug variable name

Gary E. Miller gitlab at mg.gitlab.com
Mon Aug 22 23:06:04 UTC 2016


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


Commits:
4ed2797a by Gary E. Miller at 2016-08-22T16:05:41-07:00
Fix typos in debug variable name

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -327,7 +327,7 @@ if __name__ == '__main__':
         elif switch == "-o":
             outdir = val
         elif switch == "-D":
-            debug = int(val)      # Debug level, 0 to 9, 9 most verbose
+            debug_level = int(val)      # Debug level, 0 to 9, 9 most verbose
         elif switch == "-N":
             # implemented as integer, in case the option needs to be extended
             nice = 19             # run ntpviz "nice"ly
@@ -355,10 +355,10 @@ if __name__ == '__main__':
             show_cpu_temp = True
     period = 24 * 60 * 60 * period_days
 
-    if 0 < debug:
+    if 0 < debug_level:
         sys.stderr.write("ntpviz: INFO: now running at debug: %s\n" % \
-            debug)
-        if 9 == debug:
+            debug_level)
+        if 9 == debug_level:
             # crazy debug, also profile
             import cProfile, pstats
             pr = cProfile.Profile()
@@ -372,13 +372,13 @@ if __name__ == '__main__':
             p.ionice(psutil.IOPRIO_CLASS_IDLE)
 
         except ImportError:
-            if 0 < debug:
+            if 0 < debug_level:
                 sys.stderr.write("ntpviz: INFO: psutils not found\n")
             pass
 
         # set nice()
         nice = os.nice( nice )
-        if 2 < debug:
+        if 2 < debug_level:
             sys.stderr.write("ntpviz: INFO: now running at nice: %s\n" % \
                 nice)
 
@@ -558,7 +558,7 @@ ntpviz</a>, part of the <a href="https://www.ntpsec.org/">NTPsec project</a>
                 ifile.close()
 
 
-if 9 == debug:
+if 9 == debug_level:
     # finish the profile
     pr.disable()
     pr.print_stats('tottime')



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4ed2797a60097221ac5605fb64ec3c788f2d5bda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160822/0a6cb542/attachment.html>


More information about the vc mailing list