소스 검색

Fix bug in get_unfccc_submission_info

Johannes Gütschow 1 년 전
부모
커밋
aaeb4cb771
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      code/UNFCCC_downloader/unfccc_submission_info.py

+ 1 - 1
code/UNFCCC_downloader/unfccc_submission_info.py

@@ -53,7 +53,7 @@ def get_unfccc_submission_info(
             subtree = html.find_all(
                 class_="field field--name-field-document-country field--type-termstore-entity-reference field--label-inline")
             country = subtree[0].find(class_="field--item").contents[0]
-        except AttributeError:
+        except (AttributeError, IndexError) as e:
             # author as backup for country
             subtree = html.find_all(class_="field--name-field-document-ca")
             country = subtree[0].find(class_="field--item").contents[0]