From 76df45b90dcb420a50772032d67fc5e04dc5e861 Mon Sep 17 00:00:00 2001 From: Wolfgang Fahl Date: Thu, 12 Aug 2021 14:14:14 +0200 Subject: [PATCH] handles wikidata error codes --- tests/test_location.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_location.py b/tests/test_location.py index c82ba37..dd9b3c7 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -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):