[ARVADOS] updated: 18f3b51a1795922a5c5c595b5b3fb5ce12978c64

Git user git at public.curoverse.com
Tue May 2 10:54:29 EDT 2017


Summary of changes:
 sdk/python/arvados/commands/put.py | 7 +++++--
 sdk/python/tests/test_arv_put.py   | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

       via  18f3b51a1795922a5c5c595b5b3fb5ce12978c64 (commit)
      from  4d012b23a4ac88f433986054fc0085ee6714b5b3 (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 18f3b51a1795922a5c5c595b5b3fb5ce12978c64
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue May 2 11:52:44 2017 -0300

    11579: Added assertion on test to check for file symlinks to be copied by default.
    Don't treat a PathDoesNotExist exception as an abnormal termination, just log the proper error message, and quit.

diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py
index ddc261f..6836d80 100644
--- a/sdk/python/arvados/commands/put.py
+++ b/sdk/python/arvados/commands/put.py
@@ -474,7 +474,10 @@ class ArvPutUploadJob(object):
             # Note: We're expecting SystemExit instead of KeyboardInterrupt because
             #   we have a custom signal handler in place that raises SystemExit with
             #   the catched signal's code.
-            if not isinstance(e, SystemExit) or e.code != -2:
+            if isinstance(e, PathDoesNotExistError):
+                # We aren't interested in the traceback for this case
+                pass
+            elif not isinstance(e, SystemExit) or e.code != -2:
                 self.logger.warning("Abnormal termination:\n{}".format(traceback.format_exc(e)))
             raise
         finally:
@@ -985,7 +988,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
     except PathDoesNotExistError as error:
         logger.error("\n".join([
             "arv-put: %s" % str(error)]))
-        exit(1)
+        sys.exit(1)
 
     if args.progress:  # Print newline to split stderr from stdout for humans.
         logger.info("\n")
diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index 2d17cb8..3201891 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -286,6 +286,7 @@ class ArvPutUploadJobTest(run_test_server.TestCaseWithServers,
         cwriter = arv_put.ArvPutUploadJob([self.tempdir_with_symlink])
         cwriter.start(save_collection=False)
         self.assertIn('linkeddir', cwriter.manifest_text())
+        self.assertIn('linkedfile', cwriter.manifest_text())
         cwriter.destroy_cache()
 
     def test_symlinks_are_not_followed_when_requested(self):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list