Skip to content

Commit

Permalink
bypass module LoisDites broken by Legifrance's new version until real…
Browse files Browse the repository at this point in the history
…ly fixed (cf #129)
  • Loading branch information
RouxRC committed Sep 22, 2020
1 parent 8195043 commit ce00941
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tlfp/parse_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ def process(API_DIRECTORY, url):
download_groupes(API_DIRECTORY)

# Add potential common name from Legifrance's "Lois dites"
common_laws = download_lois_dites(API_DIRECTORY)
try:
common_laws = download_lois_dites(API_DIRECTORY)
except:
print('WARNING: could not collect Lois Dites on Legifrance')
common_laws = {}
if dos.get('legifrance_cidTexte') in common_laws and common_laws[dos['legifrance_cidTexte']].lower() not in dos['short_title'].lower():
dos['loi_dite'] = common_laws[dos['legifrance_cidTexte']]

Expand Down

0 comments on commit ce00941

Please sign in to comment.