Merge branch 'master' into 7534-superuser-token
[arvados.git] / sdk / python / arvados / commands / put.py
index 887167603ab51cd1a9d1250bdd08ed13f2464d68..6fa26c672d26962a3e9cd01e140907eecec783e4 100644 (file)
@@ -169,6 +169,8 @@ def parse_arguments(arguments):
     if len(args.paths) == 0:
         args.paths = ['-']
 
+    args.paths = map(lambda x: "-" if x == "/dev/stdin" else x, args.paths)
+
     if len(args.paths) != 1 or os.path.isdir(args.paths[0]):
         if args.filename:
             arg_parser.error("""
@@ -280,7 +282,9 @@ class ArvPutCollectionWriter(arvados.ResumableCollectionWriter):
                                     replication=replication)
         except (TypeError, ValueError,
                 arvados.errors.StaleWriterStateError) as error:
-            return cls(cache, reporter, bytes_expected, num_retries=num_retries)
+            return cls(cache, reporter, bytes_expected,
+                       num_retries=num_retries,
+                       replication=replication)
         else:
             return writer