Raise Exception instead of returning False in CountryList.__init__()
since returning False is no valid python construct
This commit is contained in:
@@ -66,7 +66,8 @@ class CountryList():
|
||||
|
||||
# Check if page exits
|
||||
if not self.page.exists():
|
||||
return False
|
||||
raise CountryListError( "CountryList " +
|
||||
str(wikilink.title) + " does not exists!" )
|
||||
|
||||
# Initialise attributes
|
||||
__attr = ( "wikicode", "entry", "chartein", "_chartein_raw",
|
||||
|
||||
Reference in New Issue
Block a user