aboutsummaryrefslogtreecommitdiff
path: root/Lib/fontTools/misc/sstruct.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/fontTools/misc/sstruct.py')
-rw-r--r--Lib/fontTools/misc/sstruct.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/fontTools/misc/sstruct.py b/Lib/fontTools/misc/sstruct.py
index 8b69a429..ba1f8788 100644
--- a/Lib/fontTools/misc/sstruct.py
+++ b/Lib/fontTools/misc/sstruct.py
@@ -46,7 +46,7 @@ calcsize(fmt)
it returns the size of the data in bytes.
"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import tobytes, tostr
from fontTools.misc.fixedTools import fixedToFloat as fi2fl, floatToFixed as fl2fi
import struct
import re
@@ -68,7 +68,7 @@ def pack(fmt, obj):
if name in fixes:
# fixed point conversion
value = fl2fi(value, fixes[name])
- elif isinstance(value, basestring):
+ elif isinstance(value, str):
value = tobytes(value)
elements.append(value)
data = struct.pack(*(formatstring,) + tuple(elements))