[ARVADOS] updated: 753c1446ea70d70043be0913e52bb270d28ecded

git at public.curoverse.com git at public.curoverse.com
Mon Jul 27 09:44:13 EDT 2015


Summary of changes:
 sdk/python/bin/arv-get | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

       via  753c1446ea70d70043be0913e52bb270d28ecded (commit)
      from  ce128902e008420f453eb29986280d72777bec32 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 753c1446ea70d70043be0913e52bb270d28ecded
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 27 09:45:05 2015 -0400

    6593: Change docstring references from /dev/stdout to just "stdout".  Fix logic
    to clean up open files on KeyboardInterrupt.

diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get
index 159ed09..0d817e2 100755
--- 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.
 """)
-parser.add_argument('destination', type=str, nargs='?', default='/dev/stdout',
+parser.add_argument('destination', type=str, nargs='?', default='-',
                     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',
@@ -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
-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="""
@@ -116,7 +115,7 @@ else:
 # 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
 
@@ -226,7 +225,7 @@ for s,f,outfilename in todo:
             sys.stderr.write("%s  %s/%s\n"
                              % (digestor.hexdigest(), s.name(), f.name()))
     except KeyboardInterrupt:
-        if outfile and outfilename != '-':
+        if outfile and (outfile.fileno() > 2) and (not outfile.closed()):
             os.unlink(outfilename)
         break
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list