Skip to content

Commit

Permalink
handles wikidata error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Aug 12, 2021
1 parent 824b900 commit 76df45b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ def handleWikidataException(self,ex):
Args:
ex(Exception): the exception to handle - e.g. timeout
'''
print(f"Wikidata test failed {ex}")
msg=str(ex)
print(f"Wikidata test failed {msg}")
# only raise exception for real problems
if "HTTP Error 500" in msg:
print("test can not work if server has problems")
return
raise ex

def checkNoDuplicateWikidataIds(self,locationManager:LocationManager):
Expand Down

0 comments on commit 76df45b

Please sign in to comment.