database: always explicit convert `ip` to `str`, because may be an IPAddr, that will be unsupported type by bind parameter (as long as we've found any default wrapper handler for sqlite3)

pull/1422/head
sebres 2016-05-13 22:53:57 +02:00
parent cb280b817f
commit d420148055
1 changed files with 1 additions and 1 deletions

View File

@ -455,7 +455,7 @@ class Fail2BanDb(object):
queryArgs.append(MyTime.time() - bantime) queryArgs.append(MyTime.time() - bantime)
if ip is not None: if ip is not None:
query += " AND ip=?" query += " AND ip=?"
queryArgs.append(ip) queryArgs.append(str(ip))
query += " ORDER BY ip, timeofban desc" query += " ORDER BY ip, timeofban desc"
return cur.execute(query, queryArgs) return cur.execute(query, queryArgs)