giving up on the cursor thing

This commit is contained in:
Stefan Midjich 2017-09-29 19:06:02 +02:00
parent b84b888cd4
commit b91d30bffb
2 changed files with 2 additions and 5 deletions

View file

@ -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'),

View file

@ -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):