Commit 746f8419 authored by Dionysis Zindros's avatar Dionysis Zindros
Browse files

Windows port: All binary files now opened using the 'b' flag

parent b07589af
......@@ -650,7 +650,7 @@ class store_upload(_store_container_command):
progress_bar = self.arguments['progress_bar']
hash_bar = progress_bar.clone()
with open(local_path) as f:
with open(local_path, 'rb') as f:
if self.get_argument('unchunked'):
self.client.upload_object_unchunked(remote_path, f,
......@@ -1625,7 +1625,7 @@ class testPithos(unittest.TestCase):
self.create_large_file(1024 * 1024 * 100, 'l100M.' + unicode(
"""Upload it at a directory in container"""
newf = open(self.fname, 'r')
newf = open(self.fname, 'rb')
self.client.upload_object('/dir/sample.file', newf)
"""Check if file has been uploaded"""
......@@ -1946,7 +1946,7 @@ class testPithos(unittest.TestCase):
"""Upload a local file with one request"""
self.create_large_file(1024 * 10, 'l10K.' + unicode(
newf = open(self.fname, 'r')
newf = open(self.fname, 'rb')
self.client.upload_object('sample.file', newf)
"""Check if file has been uploaded"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment