aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--snmptrap/snmptrapd.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/snmptrap/snmptrapd.py b/snmptrap/snmptrapd.py
index d2b53f3..8a824ef 100644
--- a/snmptrap/snmptrapd.py
+++ b/snmptrap/snmptrapd.py
@@ -176,12 +176,12 @@ def log_all_arriving_traps():
if curr_hour != tds.last_hour:
roll_all_logs()
tds.last_hour = curr_hour
- else:
- # otherwise, assume daily roll
- curr_day = datetime.datetime.now().day
- if curr_day != tds.last_day:
- roll_all_logs()
- tds.last_day = curr_day
+ else:
+ # otherwise, assume daily roll
+ curr_day = datetime.datetime.now().day
+ if curr_day != tds.last_day:
+ roll_all_logs()
+ tds.last_day = curr_day
# always log arriving trap
try: