[Git][NTPsec/ntpsec][master] ntpviz: correct usage for errno
Richard Laager (@rlaager)
gitlab at mg.gitlab.com
Thu Jul 3 03:14:01 UTC 2025
Richard Laager pushed to branch master at NTPsec / ntpsec
Commits:
728c0cd7 by James Browning at 2025-07-02T21:28:01-05:00
ntpviz: correct usage for errno
Signed-off-by: Richard Laager <rlaager at wiktel.com>
[Reverted changed to non-Pythonic == idiom. Tweaked commit message.]
- - - - -
1 changed file:
- ntpclients/ntpviz.py
Changes:
=====================================
ntpclients/ntpviz.py
=====================================
@@ -48,6 +48,7 @@ import binascii
import collections
import csv
import datetime
+import errno
import math
import re
import os
@@ -448,7 +449,7 @@ def gnuplot(template, outfile=None):
try:
rcode = subprocess.call(['gnuplot', tmp_file.name], stdout=out)
except OSError as e:
- if e.errno == os.errno.ENOENT:
+ if e.errno == errno.ENOENT:
# gnuplot not found
sys.stderr.write("ntpviz: ERROR: gnuplot not found in path\n")
else:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/728c0cd7743ea97987a0c1f54471db01ff31ec47
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/728c0cd7743ea97987a0c1f54471db01ff31ec47
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20250703/5759453f/attachment-0001.htm>
More information about the vc
mailing list