Skip to content

Commit

Permalink
Merge pull request #288 from datosgobar/286-timeout-errors-on-restora…
Browse files Browse the repository at this point in the history
…tion

Atrapo errores de request al momento de restaurar un dataset
  • Loading branch information
lrromero committed Oct 8, 2019
2 parents 879da46 + 8354925 commit b7abcc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydatajson/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import logging
import traceback
from ckanapi.errors import NotFound, CKANAPIError
from requests import RequestException

from pydatajson.constants import REQUESTS_TIMEOUT, DEFAULT_TIMEZONE
from pydatajson.custom_exceptions import NumericDistributionIdentifierError
Expand Down Expand Up @@ -688,7 +689,7 @@ def restore_organization_to_ckan(catalog, owner_org, portal_url, apikey,
origin_tz=origin_tz,
dst_tz=dst_tz)
restored.append(restored_id)
except (CKANAPIError, KeyError, AttributeError,
except (CKANAPIError, KeyError, AttributeError, RequestException,
NumericDistributionIdentifierError) as e:
logger.exception('Ocurrió un error restaurando el dataset {}: {}'
.format(dataset_id, str(e)))
Expand Down

0 comments on commit b7abcc4

Please sign in to comment.