From 578251e3646386cd21a31ec9167398ca5e01ef96 Mon Sep 17 00:00:00 2001 From: Chrysostomos Nanakos Date: Mon, 18 Nov 2013 18:54:40 +0200 Subject: [PATCH 1/1] pithcat: Add support for Archipelago images Make pithcat to be able to work with 'pithosmap://' URLS that contain the name of an Archipelago map. --- snf-image-host/pithcat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/snf-image-host/pithcat b/snf-image-host/pithcat index c0a0a60..464a367 100755 --- a/snf-image-host/pithcat +++ b/snf-image-host/pithcat @@ -92,9 +92,13 @@ def print_data(backend, url): size, hashmap = backend.get_object_hashmap(account, account, container, object) elif type(url) is HashmapURL: - hashmap = [hexlify(x) - for x in backend.store.map_get(unhexlify(url.hash))] size = int(url.size) + try: + hashmap = [hexlify(x) + for x in backend.store.map_get(unhexlify(url.hash))] + except TypeError: + fullhash = "archip:%s" % url.hash + hashmap = backend.store.map_get_archipelago(fullhash, size) else: raise Exception("Invalid URL") -- 1.7.10.4