Commit 7f8dbf51 authored by Łukasz Nowak's avatar Łukasz Nowak

Re-implement conversion of 404 to DirectoryNotFound.

parent 70ec41e1
......@@ -162,7 +162,12 @@ class NetworkcacheClient(object):
file_descriptor = tempfile.NamedTemporaryFile()
request = urllib2.Request(url=url, data=None,
headers=self.shadir_header_dict)
try:
data = urllib2.urlopen(request).read()
except urllib2.HTTPError, error:
if error.code == httplib.NOT_FOUND:
raise DirectoryNotFound('Directory not found at %s' % url)
raise
# Filtering...
data_list = json.loads(data)
if len(data_list) > 1 and not \
......
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