cursor problem
This commit is contained in:
parent
c4d1801151
commit
b84b888cd4
|
@ -31,11 +31,14 @@ config.readfp(args.config)
|
||||||
|
|
||||||
sr = StoragePostgres(config=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(
|
client = Client(
|
||||||
storage=sr,
|
storage=sr,
|
||||||
chain=config.get('iptables', 'chain'),
|
chain=config.get('iptables', 'chain'),
|
||||||
client_id=client_id[0]
|
client_id=client_id
|
||||||
)
|
)
|
||||||
|
|
||||||
if datetime.now() > client.expires:
|
if datetime.now() > client.expires:
|
||||||
|
|
Loading…
Reference in New Issue