Makes the fix robust to the expected future change in bibtexparser
This commit is contained in:
parent
3a4acb9fa9
commit
33fc910925
@ -141,7 +141,8 @@ class EnDecoder(object):
|
||||
# issue: sciunto-org/python-bibtexparser/#229 is fixed too)
|
||||
if 'editor' in entries[e]:
|
||||
entries[e]['editor'] = [
|
||||
editor['name'] for editor in entries[e]['editor']]
|
||||
editor['name'] if isinstance(editor, dict) else editor
|
||||
for editor in entries[e]['editor']]
|
||||
if len(entries) > 0:
|
||||
return entries
|
||||
else:
|
||||
@ -154,7 +155,6 @@ class EnDecoder(object):
|
||||
error_msg = 'parsing error: undefined string in provided data: {}'.format(e)
|
||||
raise self.BibDecodingError(error_msg, bibdata)
|
||||
|
||||
|
||||
@classmethod
|
||||
def _format_parsing_error(cls, e):
|
||||
"""Transform a pyparsing exception into an error message
|
||||
|
Loading…
x
Reference in New Issue
Block a user