From 5b92fb2b5ef4de75ad194231a652528aefebbd87 Mon Sep 17 00:00:00 2001 From: Stefan Midjich Date: Thu, 16 Nov 2017 21:46:05 +0100 Subject: [PATCH] forgot int --- tools/manage_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/manage_client.py b/tools/manage_client.py index 09de44f..1a8fdc5 100644 --- a/tools/manage_client.py +++ b/tools/manage_client.py @@ -145,13 +145,14 @@ if args.refresh: if int(packets_val) != client.last_packets: client.last_activity = current_date - client.last_packets = packets_val + client.last_packets = int(packets_val) client.commit() # Also do a purge of clients that have no traffic for 24 hrs if client.last_activity: time_diff = client.last_activity-client.created - if client.last_packets >= packets_val and time_diff.days >= 1: + + if client.last_packets >= int(packets_val) and time_diff.days >= 1: client.enabled = False client.commit()