aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLadue, David (dl3158) <dl3158@att.com>2018-10-01 13:14:17 -0400
committerLadue, David (dl3158) <dl3158@att.com>2018-10-01 13:16:16 -0400
commitf351db55311825662f1514259b0a9d4eff9fd25d (patch)
tree4d92b1a143a77425fe001f5738d8d2dbb86d8db8
parent3e79c897cb6357fe0d599d104eb6a31965ca414a (diff)
Change-Id: I5c472ceafed99bb1b619c36d31371e51ad17bb4b Issue-ID: DCAEGEN2-842 Signed-off-by: Ladue, David (dl3158) <dl3158@att.com>
-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: