cursor problem

This commit is contained in:
Stefan Midjich 2017-09-29 19:04:06 +02:00
parent c4d1801151
commit b84b888cd4

View file

@ -31,11 +31,14 @@ config.readfp(args.config)
sr = StoragePostgres(config=config)
for client_id in sr.client_ids():
# Get cursor from psycopg2
client_ids = sr.client_ids()
for client_id in client_ids:
client = Client(
storage=sr,
chain=config.get('iptables', 'chain'),
client_id=client_id[0]
client_id=client_id
)
if datetime.now() > client.expires: