[Git][NTPsec/ntpsec][master] util.py: Python 3 has no type long.

Gary E. Miller gitlab at mg.gitlab.com
Tue Aug 15 20:03:30 UTC 2017


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


Commits:
bf582d56 by Gary E. Miller at 2017-08-15T13:03:16-07:00
util.py: Python 3 has no type long.

So so not test for it...

- - - - -


1 changed file:

- pylib/util.py


Changes:

=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -402,7 +402,7 @@ def f8dot4(f):
     if isinstance(f, basestring):
         # a string? pass it on as a signal
         return "%8s" % f
-    if not isinstance(f, (int, long, float)):
+    if not isinstance(f, (int, float)):
         # huh?
         return "       X"
     if str(float(f)).lower() == 'nan':
@@ -439,7 +439,7 @@ def f8dot3(f):
     if isinstance(f, basestring):
         # a string? pass it on as a signal
         return "%8s" % f
-    if not isinstance(f, (int, long, float)):
+    if not isinstance(f, (int, float)):
         # huh?
         return "       X"
     if str(float(f)).lower() == 'nan':
@@ -726,7 +726,7 @@ class PeerSummary:
     @staticmethod
     def prettyinterval(diff):
         "Print an interval in natural time units."
-        if not isinstance(diff, (int, long)) or diff <= 0:
+        if not isinstance(diff, int) or diff <= 0:
             return '-'
         if diff <= 2048:
             return str(diff)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/bf582d56b99a9950ab21308b7fc864174a5ea305

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/bf582d56b99a9950ab21308b7fc864174a5ea305
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/20170815/5bbb6586/attachment.html>


More information about the vc mailing list