mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
python3: more BytesIO
This commit is contained in:
parent
69711828bd
commit
f61dcf6b1a
@ -10,7 +10,7 @@ INFO = 1
|
|||||||
WARN = 2
|
WARN = 2
|
||||||
ERROR = 3
|
ERROR = 3
|
||||||
|
|
||||||
import sys, traceback, cStringIO
|
import sys, traceback, io
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ class Stream(object):
|
|||||||
|
|
||||||
def __init__(self, stream=None):
|
def __init__(self, stream=None):
|
||||||
if stream is None:
|
if stream is None:
|
||||||
stream = cStringIO.StringIO()
|
stream = io.BytesIO()
|
||||||
self.stream = stream
|
self.stream = stream
|
||||||
self._prints = partial(prints, safe_encode=True, file=stream)
|
self._prints = partial(prints, safe_encode=True, file=stream)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user