Skip to content

Commit

Permalink
catch AttributeError on metadata with no date (#2469)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Apr 13, 2016
1 parent 8dc5e2f commit 562af5f
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 @@ -220,7 +220,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 562af5f

Please sign in to comment.