Skip to content

Commit 18266ab

Browse files
author
Mike Hearne
authored
Merge pull request #80 from mhearne-usgs/test
working around times when product contents is not a dictionary
2 parents d37d1ac + c1e70af commit 18266ab

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libcomcat/comcat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def getAllVersions(eventid,productname,contentlist,folder=os.getcwd()):
117117
print 'Looking at %s product with update time %i' % (productname,product['updateTime'])
118118
if product['code'] != eventid:
119119
continue
120+
if not isinstance(product['contents'],dict):
121+
continue
120122
pkeys = product['contents'].keys()
121123
if contentlist[0] not in pkeys:
122124
pass

0 commit comments

Comments
 (0)