mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
cursor problem
This commit is contained in:
parent
c4d1801151
commit
b84b888cd4
1 changed files with 5 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue