[binary] use seek(0) in `from_file` Binary creation method (closes #2189183) stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Tue, 14 Feb 2012 15:15:59 +0100
branchstable
changeset 8234 83fd9ff90a9d
parent 8233 9b9180969892
child 8235 c2a91d6639d8
[binary] use seek(0) in `from_file` Binary creation method (closes #2189183)
__init__.py
--- a/__init__.py	Tue Feb 14 15:15:09 2012 +0100
+++ b/__init__.py	Tue Feb 14 15:15:59 2012 +0100
@@ -117,6 +117,7 @@
                     binary.write(chunk)
             else:
                 binary.write(fobj.read())
+        binary.seek(0)
         return binary