Skip to content

Commit

Permalink
Add exception logging for initial XML parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
CGillen committed Feb 4, 2020
1 parent e73753a commit 202cdd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/batch_export_ead_archiveswest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def run(self):
% (repo_id, resource_id, options[0], options[1], options[2], options[3])
# Export resource
resp = super()._call(url, "get", None)
as_xml = etree.fromstring(resp.text.encode('utf-8'))
try:
as_xml = etree.fromstring(resp.text.encode('utf-8'))
except Exception as e:
self.logger.exception('Could not parse received XML')
continue

# Build ArchivesWest XML
namespaces = {
Expand Down

0 comments on commit 202cdd9

Please sign in to comment.