Skip to content

Commit

Permalink
Merge pull request django-import-export#401 from carlosp420/master
Browse files Browse the repository at this point in the history
Error message did not show filename
  • Loading branch information
bmihelac committed Feb 15, 2016
2 parents a207f57 + 8df4c71 commit 1a868be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion import_export/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def import_action(self, request, *args, **kwargs):
except UnicodeDecodeError as e:
return HttpResponse(_(u"<h1>Imported file has a wrong encoding: %s</h1>" % e))
except Exception as e:
return HttpResponse(_(u"<h1>%s encountred while trying to read file: %s</h1>" % (type(e).__name__, e)))
return HttpResponse(_(u"<h1>%s encountered while trying to read file: %s</h1>" % (type(e).__name__, import_file.name)))
result = resource.import_data(dataset, dry_run=True,
raise_errors=False,
file_name=import_file.name,
Expand Down

0 comments on commit 1a868be

Please sign in to comment.