[ARVADOS] updated: 1b8caff3ad598744e4a0379b01fc95ca4838caa0

git at public.curoverse.com git at public.curoverse.com
Fri Jul 31 10:28:21 EDT 2015


Summary of changes:
 sdk/python/arvados/commands/arv_copy.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  1b8caff3ad598744e4a0379b01fc95ca4838caa0 (commit)
      from  61da6612acb822a87fca157fe39757460213473f (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 1b8caff3ad598744e4a0379b01fc95ca4838caa0
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Jul 31 10:26:42 2015 -0400

    Fix type checks in arv-copy recursive collection copying.
    
    This is necessary follow-up from
    79564b0ac7d03327cc351bbd6df544ab1f776380.  API objects are now
    OrderedDicts instead of dicts, so `type(obj) == dict` is never true,
    and calling this function on an API object is a noop.
    
    No issue #.  I found this after receiving a user report that arv-copy
    did not copy dependent collections from a pipeline template.

diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py
index b68b5dc..c5749cc 100755
--- a/sdk/python/arvados/commands/arv_copy.py
+++ b/sdk/python/arvados/commands/arv_copy.py
@@ -329,9 +329,9 @@ def copy_collections(obj, src, dst, args):
         obj = arvados.util.portable_data_hash_pattern.sub(copy_collection_fn, obj)
         obj = arvados.util.collection_uuid_pattern.sub(copy_collection_fn, obj)
         return obj
-    elif type(obj) == dict:
+    elif isinstance(obj, dict):
         return {v: copy_collections(obj[v], src, dst, args) for v in obj}
-    elif type(obj) == list:
+    elif isinstance(obj, list):
         return [copy_collections(v, src, dst, args) for v in obj]
     return obj
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list