From 6143b643c63de8726c8858466aafe6b0b56546bf Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 21 Jul 2011 18:12:33 +0200 Subject: [PATCH] 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. --- conf/auth/phpbb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.30.2