diff options
Diffstat (limited to 'chimere/tasks.py')
-rw-r--r-- | chimere/tasks.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chimere/tasks.py b/chimere/tasks.py index 2d55bfd..d457f6a 100644 --- a/chimere/tasks.py +++ b/chimere/tasks.py @@ -27,6 +27,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ from chimere.models import Importer +from external_utils import OsmApi def single_instance_task(timeout): @@ -110,7 +111,11 @@ def exporting(importer_pk): return importer.state = unicode(IMPORT_MESSAGES['export_process'][0]) importer.save() - updated_item, error = importer.manager.put() + error = None + try: + updated_item, error = importer.manager.put() + except OsmApi.ApiError, error: + pass if error: importer.state = unicode(IMPORT_MESSAGES['export_failed'][0]) \ + u" - " + unicode(IMPORT_MESSAGES['export_failed'][1]) % error |