Merge branch '13006-api-is_a-filter' into 13006-sync-groups-is_a-filter
[arvados.git] / sdk / python / arvados / commands / run.py
index 96f5bdd44a12ae42c25fbe64f68b342cb0356fcf..b17ed291807ab88de5948cfcdfaf6562bea5d009 100644 (file)
@@ -151,8 +151,8 @@ def statfile(prefix, fn, fnPattern="$(file %s/%s)", dirPattern="$(dir %s/%s/)",
     return prefix+fn
 
 def write_file(collection, pathprefix, fn, flush=False):
-    with open(os.path.join(pathprefix, fn)) as src:
-        dst = collection.open(fn, "w")
+    with open(os.path.join(pathprefix, fn), "rb") as src:
+        dst = collection.open(fn, "wb")
         r = src.read(1024*128)
         while r:
             dst.write(r)