projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 7167-keep-rsync
[arvados.git]
/
sdk
/
python
/
bin
/
arv-get
diff --git
a/sdk/python/bin/arv-get
b/sdk/python/bin/arv-get
index 159ed09d2a943e61bc2a96e9a3d9506f7569c2ae..60d4bec3b95c429643d7df4a600f72754954809a 100755
(executable)
--- a/
sdk/python/bin/arv-get
+++ b/
sdk/python/bin/arv-get
@@
-24,10
+24,9
@@
parser.add_argument('locator', type=str,
help="""
Collection locator, optionally with a file path or prefix.
""")
help="""
Collection locator, optionally with a file path or prefix.
""")
-parser.add_argument('destination', type=str, nargs='?', default='
/dev/stdout
',
+parser.add_argument('destination', type=str, nargs='?', default='
-
',
help="""
help="""
-Local file or directory where the data is to be written. Default:
-/dev/stdout.
+Local file or directory where the data is to be written. Default: stdout.
""")
group = parser.add_mutually_exclusive_group()
group.add_argument('--progress', action='store_true',
""")
group = parser.add_mutually_exclusive_group()
group.add_argument('--progress', action='store_true',
@@
-74,7
+73,7
@@
group.add_argument('-f', action='store_true',
help="""
Overwrite existing files while writing. The default behavior is to
refuse to write *anything* if any of the output files already
help="""
Overwrite existing files while writing. The default behavior is to
refuse to write *anything* if any of the output files already
-exist. As a special case, -f is not needed to write to
/dev/
stdout.
+exist. As a special case, -f is not needed to write to stdout.
""")
group.add_argument('--skip-existing', action='store_true',
help="""
""")
group.add_argument('--skip-existing', action='store_true',
help="""
@@
-116,7
+115,7
@@
else:
# that isn't a tty.
if (not (args.batch_progress or args.no_progress)
and sys.stderr.isatty()
# that isn't a tty.
if (not (args.batch_progress or args.no_progress)
and sys.stderr.isatty()
- and (args.destination != '
/dev/stdout
'
+ and (args.destination != '
-
'
or not sys.stdout.isatty())):
args.progress = True
or not sys.stdout.isatty())):
args.progress = True
@@
-226,8
+225,8
@@
for s,f,outfilename in todo:
sys.stderr.write("%s %s/%s\n"
% (digestor.hexdigest(), s.name(), f.name()))
except KeyboardInterrupt:
sys.stderr.write("%s %s/%s\n"
% (digestor.hexdigest(), s.name(), f.name()))
except KeyboardInterrupt:
- if outfile and
outfilename != '-'
:
- os.unlink(outfilename)
+ if outfile and
(outfile.fileno() > 2) and not outfile.closed
:
+ os.unlink(outfile
.
name)
break
if args.progress:
break
if args.progress: