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.
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