From: Matthijs Kooijman Date: Thu, 21 Jul 2011 16:12:33 +0000 (+0200) Subject: phpbb: Make sure PhpbbAuth::check_login always returns a tuple. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fwipi.git;a=commitdiff_plain;h=6143b643c63de8726c8858466aafe6b0b56546bf phpbb: Make sure PhpbbAuth::check_login always returns a tuple. Before, it would sometimes return False, which resulted in an exception trying to unpack it as a tuple. --- diff --git a/conf/auth/phpbb.py b/conf/auth/phpbb.py index 58dd72c..54763b3 100644 --- a/conf/auth/phpbb.py +++ b/conf/auth/phpbb.py @@ -207,7 +207,7 @@ class PhpbbAuth(BaseAuth): conn = connect(**self.dbconfig) if not conn: - return False + return (False, False) # Get some data. Note that we interpolate the prefix ourselves, since # letting the mysql library do it only works with values (it adds '' @@ -223,7 +223,7 @@ class PhpbbAuth(BaseAuth): # No data? No login. if (cursor.rowcount == 0): conn.close() - return False + return (False, False) # Check password row = cursor.fetchone()