Change Module.test API to something more intuitive

(I mean, what the hell has crossed my mind to name a method *test*
and let it return FALSE if successful? :D)
This commit is contained in:
enkore 2013-03-16 12:58:01 +01:00
parent 0e90cbfceb
commit 1171a1d0ae

View File

@ -25,12 +25,10 @@ class Module(SettingsBase):
def test(self): def test(self):
""" """
Return None* if settings seem ok (i.e. login credentials and such are valid) Return True if settings seem ok (i.e. login credentials and such are valid)
or a string describing the problem or a string describing the problem
* or some other value evaluating to false in a boolean context
""" """
return return True
def on_click(self, button): def on_click(self, button):
if button == 1: # Left mouse button if button == 1: # Left mouse button