Skip to content

Commit

Permalink
Catch both IndexError and KeyError, fixes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxor1337 authored and ilius committed Apr 21, 2016
1 parent a4aa1cd commit 74d0344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyglossary/glossary.py
Expand Up @@ -429,7 +429,7 @@ def writeTxt(self, sep, filename='', writeInfo=True, rplList=[], ext='.txt', hea
if self.getPref('enable_alts', True):
try:
alts = item[2]['alts']
except IndexError as KeyError:
except (IndexError, KeyError):
pass
else:
if alts:
Expand Down

0 comments on commit 74d0344

Please sign in to comment.