[ARVADOS] created: 554dd04bce5a5955225609ef36a21b479b3a0f0a

Git user git at public.curoverse.com
Tue Jul 26 16:25:00 EDT 2016


        at  554dd04bce5a5955225609ef36a21b479b3a0f0a (commit)


commit 554dd04bce5a5955225609ef36a21b479b3a0f0a
Author: radhika <radhika at curoverse.com>
Date:   Tue Jul 26 16:23:14 2016 -0400

    8568: Enhance image_hash parsing when using Docker 1.10+

diff --git a/sdk/python/arvados/commands/keepdocker.py b/sdk/python/arvados/commands/keepdocker.py
index e8ce2ee..9310f06 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -399,7 +399,12 @@ def main(arguments=None, stdout=sys.stdout):
     # Read the image metadata and make Arvados links from it.
     image_file.seek(0)
     image_tar = tarfile.open(fileobj=image_file)
-    json_file = image_tar.extractfile(image_tar.getmember(image_hash + '/json'))
+    image_hash_type, _, raw_image_hash = image_hash.rpartition(':')
+    if image_hash_type:
+        json_filename = raw_image_hash + '.json'
+    else:
+        json_filename = raw_image_hash + '/json'
+    json_file = image_tar.extractfile(image_tar.getmember(json_filename))
     image_metadata = json.load(json_file)
     json_file.close()
     image_tar.close()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list