Revision: 7125 Author: alexsh Date: 2009-08-07 07:59:10 +0000 (Fri, 07 Aug 2009)
Log Message: ----------- Fix:site NotImplementedError and return again by ordinary.
Modified Paths: -------------- trunk/pywikipedia/login.py
Modified: trunk/pywikipedia/login.py =================================================================== --- trunk/pywikipedia/login.py 2009-08-07 07:51:37 UTC (rev 7124) +++ trunk/pywikipedia/login.py 2009-08-07 07:59:10 UTC (rev 7125) @@ -251,9 +251,9 @@ try: cookiedata = self.getCookie(api) except NotImplementedError: - wikipedia.output('API disabled because this site does not support.') + wikipedia.output('API disabled because this site does not support.\nRetrying by ordinary way...') api = False - cookiedata = self.getCookie(api) + return self.login(False, retry) if cookiedata: self.storecookiedata(cookiedata) wikipedia.output(u"Should be logged in now") @@ -269,7 +269,7 @@
if retry: self.password = None - return self.login(api = api, retry = True) + return self.login(api, True) else: return False