Skip to content

Commit

Permalink
Fix py3 dict.values index access
Browse files Browse the repository at this point in the history
  • Loading branch information
titusz committed Jul 19, 2015
1 parent 8dc4ae4 commit c7bccd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/onixcheck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def from_tree(cls, tree):
if onix_version is None:
log.warning('No release attribute on root element. Try namespace.')
try:
if cls.V21 in root.nsmap.values()[0]:
if cls.V21 in list(root.nsmap.values())[0]:
onix_version = cls.V21
elif cls.V30 in root.nsmap.values()[0]:
elif cls.V30 in list(root.nsmap.values())[0]:
onix_version = cls.V30
else:
raise OnixError('Could not determin ONIX version.')
Expand Down

0 comments on commit c7bccd9

Please sign in to comment.