mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
giving up on the cursor thing
This commit is contained in:
parent
b84b888cd4
commit
b91d30bffb
2 changed files with 2 additions and 5 deletions
|
@ -31,10 +31,7 @@ config.readfp(args.config)
|
|||
|
||||
sr = StoragePostgres(config=config)
|
||||
|
||||
# Get cursor from psycopg2
|
||||
client_ids = sr.client_ids()
|
||||
|
||||
for client_id in client_ids:
|
||||
for (client_id) in sr.client_ids():
|
||||
client = Client(
|
||||
storage=sr,
|
||||
chain=config.get('iptables', 'chain'),
|
||||
|
|
|
@ -37,7 +37,7 @@ class StoragePostgres(object):
|
|||
self.cur.execute(
|
||||
'select client_id from client'
|
||||
)
|
||||
return self.cur
|
||||
return self.cur.fetchall()
|
||||
|
||||
|
||||
def get_client_by_id(self, client_id):
|
||||
|
|
Loading…
Reference in a new issue