Raise Exception instead of returning False in CountryList.__init__()

since returning False is no valid python construct
This commit is contained in:
2016-01-04 12:28:40 +01:00
parent 81e541ef1d
commit b6c7a74519

View File

@@ -66,7 +66,8 @@ class CountryList():
# Check if page exits # Check if page exits
if not self.page.exists(): if not self.page.exists():
return False raise CountryListError( "CountryList " +
str(wikilink.title) + " does not exists!" )
# Initialise attributes # Initialise attributes
__attr = ( "wikicode", "entry", "chartein", "_chartein_raw", __attr = ( "wikicode", "entry", "chartein", "_chartein_raw",