Skip to content

Commit

Permalink
Merge pull request #2470 from tomkralidis/issue-2469
Browse files Browse the repository at this point in the history
catch AttributeError on metadata with no date (#2469)
  • Loading branch information
tomkralidis committed Apr 13, 2016
2 parents 0f9c7d6 + 12d88b5 commit 33f800e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geonode/layers/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def sniff_date(datestr):
for dfmt in dateformats:
try:
return datetime.datetime.strptime(datestr.strip(), dfmt)
except ValueError:
except (AttributeError, ValueError):
pass


Expand Down

0 comments on commit 33f800e

Please sign in to comment.