do not abort on server error

This commit is contained in:
Frédéric Péters 2013-11-29 19:13:41 +01:00
parent 3102eff49e
commit b64d4efa3b
1 changed files with 5 additions and 1 deletions

View File

@ -207,7 +207,11 @@ class SyncFromThemis(UtilityView):
for count, document_url in enumerate(documents):
log.info('loading %s' % document_url)
data = json.load(self.urlopen('%s/json' % document_url))
try:
data = json.load(self.urlopen('%s/json' % document_url))
except urllib2.HTTPError as e:
logging.info('failed to load (%r)' % e)
continue
new_id = data.get('id')
is_question = False