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

View File

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