Skip to content

Commit d577923

Browse files
Santtu Pajukantajapsu
authored andcommitted
port to python 2.5
str.format was used in sql.py. Reverted to the % operator to enable usage of Python 2.5.
1 parent b56d8f4 commit d577923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phpbb/auth/sql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
'user_login_attempts'
3535
]
3636

37-
GET_USER_ROW_SQL = 'SELECT {0} FROM {1} WHERE username_clean = {2}'
37+
GET_USER_ROW_SQL = 'SELECT %s FROM %s WHERE username_clean = %s'
3838

3939
class GetUserRow(object):
4040
def __init__(self, *args, **kwargs):
@@ -46,7 +46,7 @@ def __init__(self, *args, **kwargs):
4646

4747
def setup(self, conn, param_style=DEFAULT_PARAM_STYLE, users_table=DEFAULT_USERS_TABLE):
4848
self.conn = conn
49-
self.sql = GET_USER_ROW_SQL.format(", ".join(USER_ROW_FIELDS), users_table, param_style)
49+
self.sql = GET_USER_ROW_SQL % (", ".join(USER_ROW_FIELDS), users_table, param_style)
5050

5151
def is_setup(self):
5252
return self.conn is not None

0 commit comments

Comments
 (0)