Change assert to check for bytearray stream rather than file handle.

feature/documentation-builds-dirhtml
Isis Lovecruft 2013-04-02 05:38:32 +00:00
parent 5b38b64c97
commit d8351e52e9
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 3 additions and 2 deletions

View File

@ -61,6 +61,7 @@ import locale
try:
from io import StringIO
from io import BytesIO
except ImportError:
from cStringIO import StringIO
@ -102,8 +103,8 @@ def _copy_data(instream, outstream):
sent = 0
try:
assert isinstance(instream, file), "instream is not a file"
assert isinstance(outsteam, file), "outstream is not a file"
assert isinstance(instream, BytesIO), "instream is not a file"
assert isinstance(outstream, file), "outstream is not a file"
except AssertionError as ae:
logger.exception(ae)
return