Commit e2cb9712 authored by Lucas Carvalho's avatar Lucas Carvalho

Simplified API of networkcached. The PATH_INFO must be /get/<URL_ENCODED>.

parent 1e4e10de
...@@ -83,7 +83,8 @@ def get_sha256sum_from_networkcached(network_cache, url, logger): ...@@ -83,7 +83,8 @@ def get_sha256sum_from_networkcached(network_cache, url, logger):
Return the sha256sum if the url exists in networkcached server. Return the sha256sum if the url exists in networkcached server.
""" """
network_cached_url = os.path.join(network_cache, network_cached_url = os.path.join(network_cache,
'map/get', base64.encodestring(url)) 'get', base64.encodestring(url))
print network_cached_url
try: try:
result = urllib.urlopen(network_cached_url) result = urllib.urlopen(network_cached_url)
if int(result.code) == 200: if int(result.code) == 200:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment