This commit is contained in:
Kovid Goyal 2021-09-21 09:00:01 +05:30
parent a8e449dcbc
commit 058353b278
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -4,10 +4,9 @@
import os
from polyglot.builtins import range, unicode_type
class ReadOnlyFileBuffer(object):
class ReadOnlyFileBuffer:
''' A zero copy implementation of a file like object. Uses memoryviews for efficiency. '''
@ -68,7 +67,7 @@ def svg_path_to_painter_path(d):
# x1/y1 and x2/y2 = bezier control points
x = y = x1 = y1 = x2 = y2 = 0
if isinstance(d, unicode_type):
if isinstance(d, str):
d = d.encode('ascii')
d = d.replace(b',', b' ').replace(b'\n', b' ')
end = len(d)