[Git][NTPsec/ntpsec][master] util.py: Python 3 has no type basestring.
Gary E. Miller
gitlab at mg.gitlab.com
Tue Aug 15 21:04:56 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
7de8b8d3 by Gary E. Miller at 2017-08-15T14:04:34-07:00
util.py: Python 3 has no type basestring.
Fingers crossed that type str is close enough.
- - - - -
1 changed file:
- pylib/util.py
Changes:
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -399,7 +399,7 @@ def unitify(value, startingunit, baseunit=None, width=8):
def f8dot4(f):
"Scaled floating point formatting to fit in 8 characters"
- if isinstance(f, basestring):
+ if isinstance(f, string):
# a string? pass it on as a signal
return "%8s" % f
if not isinstance(f, (int, float)):
@@ -436,7 +436,7 @@ def f8dot4(f):
def f8dot3(f):
"Scaled floating point formatting to fit in 8 characters"
- if isinstance(f, basestring):
+ if isinstance(f, str):
# a string? pass it on as a signal
return "%8s" % f
if not isinstance(f, (int, float)):
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7de8b8d3bf4b8ff0c63e74ac08c4373fc00de008
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7de8b8d3bf4b8ff0c63e74ac08c4373fc00de008
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/241c8005/attachment.html>
More information about the vc
mailing list