From: Ward Vandewege Date: Tue, 23 Sep 2014 18:59:48 +0000 (-0400) Subject: * Do not blow up when arv-get requests a collection that gets a 404 from the api... X-Git-Tag: 1.1.0~2172 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/9c7058321b88320594fccec767a8326e0bb9db4f * Do not blow up when arv-get requests a collection that gets a 404 from the api server. * Be more consistent in naming of error variables. no issue # --- diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get index 38a9823973..0059f3faef 100755 --- a/sdk/python/bin/arv-get +++ b/sdk/python/bin/arv-get @@ -140,7 +140,7 @@ if not get_prefix: except (IOError, OSError) as error: abort("can't write to '{}': {}".format(args.destination, error)) except (arvados.errors.ApiError, arvados.errors.KeepReadError) as error: - abort("failed to download '{}': {}".format(collection, e)) + abort("failed to download '{}': {}".format(collection, error)) sys.exit(0) # Scan the collection. Make an array of (stream, file, local @@ -188,8 +188,8 @@ for s,f,outfilename in todo: arvados.util.mkdir_dash_p(os.path.dirname(outfilename)) try: outfile = open(outfilename, 'wb') - except Exception as e: - abort('Open(%s) failed: %s' % (outfilename, e)) + except Exception as error: + abort('Open(%s) failed: %s' % (outfilename, error)) if args.hash: digestor = hashlib.new(args.hash) try: