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
|
# 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",
|
||||||
|
|||||||
Reference in New Issue
Block a user