[ARVADOS] updated: 8bd432b7fe67766d6f92902e20b5e63c9f18146d
git at public.curoverse.com
git at public.curoverse.com
Mon Oct 20 15:18:31 EDT 2014
Summary of changes:
sdk/python/arvados/commands/copy.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
via 8bd432b7fe67766d6f92902e20b5e63c9f18146d (commit)
from cdaf5c71016d2cad54d54e9b4b87bafe4554d376 (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 8bd432b7fe67766d6f92902e20b5e63c9f18146d
Author: Tim Pierce <twp at curoverse.com>
Date: Mon Oct 20 14:45:08 2014 -0400
3699: bug fix
The re.sub 'repl' function takes a MatchObject as argument, not a
string. Oops.
Also we need to do manifest.splitlines(True) in order to be able to tell
whether the manifest ends with a newline in the first place.
diff --git a/sdk/python/arvados/commands/copy.py b/sdk/python/arvados/commands/copy.py
index 2d2b32a..191139e 100755
--- a/sdk/python/arvados/commands/copy.py
+++ b/sdk/python/arvados/commands/copy.py
@@ -269,13 +269,14 @@ def copy_pipeline_template(pt_uuid, src, dst, args):
#
def copy_collections(obj, src, dst, args):
- def copy_collection_fn(src_id):
- """Helper function for regex substitution: copies a single collection
- identified by 'src_id' to the destination. Returns the
- destination collection uuid (or the portable data hash if
- that's what src_id is).
+ def copy_collection_fn(collection_match):
+ """Helper function for regex substitution: copies a single collection,
+ identified by the collection_match MatchObject, to the
+ destination. Returns the destination collection uuid (or the
+ portable data hash if that's what src_id is).
"""
+ src_id = collection_match.group(0)
if src_id not in collections_copied:
dst_col = copy_collection(src_id, src, dst, args)
if src_id in [dst_col['uuid'], dst_col['portable_data_hash']]:
@@ -419,7 +420,7 @@ def copy_collection(obj_uuid, src, dst, args):
else:
progress_writer = None
- for line in manifest.splitlines():
+ for line in manifest.splitlines(True):
words = line.split()
dst_manifest_line = words[0]
for word in words[1:]:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list