From 33fc910925245daad1a2a5c2aa77640b5bcbe7bd Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Thu, 17 Jan 2019 22:49:30 -0800 Subject: [PATCH] Makes the fix robust to the expected future change in bibtexparser --- pubs/endecoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubs/endecoder.py b/pubs/endecoder.py index e334eb1..346af3a 100644 --- a/pubs/endecoder.py +++ b/pubs/endecoder.py @@ -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