giving up on the cursor thing
This commit is contained in:
parent
b84b888cd4
commit
b91d30bffb
|
@ -31,10 +31,7 @@ config.readfp(args.config)
|
||||||
|
|
||||||
sr = StoragePostgres(config=config)
|
sr = StoragePostgres(config=config)
|
||||||
|
|
||||||
# Get cursor from psycopg2
|
for (client_id) in sr.client_ids():
|
||||||
client_ids = sr.client_ids()
|
|
||||||
|
|
||||||
for client_id in client_ids:
|
|
||||||
client = Client(
|
client = Client(
|
||||||
storage=sr,
|
storage=sr,
|
||||||
chain=config.get('iptables', 'chain'),
|
chain=config.get('iptables', 'chain'),
|
||||||
|
|
|
@ -37,7 +37,7 @@ class StoragePostgres(object):
|
||||||
self.cur.execute(
|
self.cur.execute(
|
||||||
'select client_id from client'
|
'select client_id from client'
|
||||||
)
|
)
|
||||||
return self.cur
|
return self.cur.fetchall()
|
||||||
|
|
||||||
|
|
||||||
def get_client_by_id(self, client_id):
|
def get_client_by_id(self, client_id):
|
||||||
|
|
Loading…
Reference in New Issue