[Git][NTPsec/ntpsec][master] Fix debug that just got broken again.
Gary E. Miller
gitlab at mg.gitlab.com
Tue Aug 23 00:47:26 UTC 2016
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
d082ed09 by Gary E. Miller at 2016-08-22T17:46:17-07:00
Fix debug that just got broken again.
- - - - -
1 changed file:
- ntpstats/ntpviz
Changes:
=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -339,7 +339,7 @@ if __name__ == '__main__':
elif switch == "-o":
outdir = val
elif switch == "-D":
- debug_level = int(val) # Debug level, 0 to 9, 9 most verbose
+ debug = 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
@@ -367,10 +367,10 @@ if __name__ == '__main__':
show_cpu_temp = True
period = 24 * 60 * 60 * period_days
- if 0 < debug_level:
+ if 0 < debug:
sys.stderr.write("ntpviz: INFO: now running at debug: %s\n" % \
- debug_level)
- if 9 == debug_level:
+ debug)
+ if 9 == debug:
# crazy debug, also profile
import cProfile, pstats
pr = cProfile.Profile()
@@ -384,13 +384,13 @@ if __name__ == '__main__':
p.ionice(psutil.IOPRIO_CLASS_IDLE)
except ImportError:
- if 0 < debug_level:
+ if 0 < debug:
sys.stderr.write("ntpviz: INFO: psutils not found\n")
pass
# set nice()
nice = os.nice( nice )
- if 2 < debug_level:
+ if 2 < debug:
sys.stderr.write("ntpviz: INFO: now running at nice: %s\n" % \
nice)
@@ -573,7 +573,7 @@ ntpviz</a>, part of the <a href="https://www.ntpsec.org/">NTPsec project</a>
ifile.close()
-if 9 == debug_level:
+if 9 == debug:
# finish the profile
pr.disable()
pr.print_stats('tottime')
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d082ed094b735cad49137dbe0e939f87ab25635c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160823/af07a526/attachment.html>
More information about the vc
mailing list