From 4c195451c5eae176a88f0ccc97d44fe123f3f984 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom <lluis.gifre@cttc.es> Date: Thu, 13 Jul 2023 12:38:18 +0000 Subject: [PATCH] Update l3_distributedattackdetector.py --- .../service/l3_distributedattackdetector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py index 269640538..2cee9d20c 100644 --- a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py +++ b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py @@ -106,20 +106,20 @@ class l3_distributedattackdetector: LOGGER.info("Gracefully stopping...") - def follow(self, file, time_sleep): + def follow(self, logfile, time_sleep): """ - Generator function that yields new lines in a file + Generator function that yields new lines in a log file """ # seek the end of the file - # file.seek(0, os.SEEK_END) + # logfile.seek(0, os.SEEK_END) chunk = "" # start an infinite loop while True: # read last line of the file - line = file.readline() + line = logfile.readline() # sleep if the file hasn't been updated if not line: -- GitLab