[ARVADOS] updated: d613d109dd067be0161380b0c911204e6b47312b
git at public.curoverse.com
git at public.curoverse.com
Fri Sep 5 13:55:11 EDT 2014
Summary of changes:
sdk/python/arvados/commands/copy.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
via d613d109dd067be0161380b0c911204e6b47312b (commit)
from d7e750680bbf5e655d7c986ce0cff550c8022ca4 (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 d613d109dd067be0161380b0c911204e6b47312b
Author: Tim Pierce <twp at clinicalfuture.com>
Date: Fri Sep 5 17:55:00 2014 +0000
3699: bug fixes
diff --git a/sdk/python/arvados/commands/copy.py b/sdk/python/arvados/commands/copy.py
index ec7b92e..8488042 100755
--- a/sdk/python/arvados/commands/copy.py
+++ b/sdk/python/arvados/commands/copy.py
@@ -18,6 +18,7 @@
import argparse
import os
+import re
import sets
import sys
import logging
@@ -26,8 +27,9 @@ import arvados
import arvados.config
import arvados.keep
+logger = logging.getLogger('arvados.arv-copy')
+
def main():
- logger = logging.getLogger('arvados.arv-copy')
logger.setLevel(logging.DEBUG)
parser = argparse.ArgumentParser(
@@ -121,6 +123,7 @@ def copy_collection(obj_uuid, src=None, dst=None):
abort('bad manifest line in collection {}: {}'.format(obj_uuid, f))
# Copy each block from src_keep to dst_keep.
+ dst_keep = arvados.keep.KeepClient(dst)
for locator in collection_blocks:
data = src_keep.get(locator)
logger.debug('copying block %s', locator)
@@ -129,7 +132,7 @@ def copy_collection(obj_uuid, src=None, dst=None):
# Copy the manifest and save the collection.
dst_keep.put(manifest)
- return dst_keep.collections().create(manifest_text=manifest).execute()
+ return dst.collections().create(body={"manifest_text": manifest}).execute()
# copy_pipeline_instance(obj_uuid, src, dst)
#
@@ -214,8 +217,8 @@ def uuid_type(api, object_uuid):
type_prefix = object_uuid.split('-')[1]
for k in api._schema.schemas:
obj_class = api._schema.schemas[k].get('uuidPrefix', None)
- if obj_class:
- return obj_class
+ if type_prefix == obj_class:
+ return k
return None
def abort(msg, code=1):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list