mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a8e449dcbc
commit
058353b278
@ -4,10 +4,9 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
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. '''
|
''' 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
|
# x1/y1 and x2/y2 = bezier control points
|
||||||
x = y = x1 = y1 = x2 = y2 = 0
|
x = y = x1 = y1 = x2 = y2 = 0
|
||||||
|
|
||||||
if isinstance(d, unicode_type):
|
if isinstance(d, str):
|
||||||
d = d.encode('ascii')
|
d = d.encode('ascii')
|
||||||
d = d.replace(b',', b' ').replace(b'\n', b' ')
|
d = d.replace(b',', b' ').replace(b'\n', b' ')
|
||||||
end = len(d)
|
end = len(d)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user