diff options
author | Ladue, David (dl3158) <dl3158@att.com> | 2018-10-01 13:14:17 -0400 |
---|---|---|
committer | Ladue, David (dl3158) <dl3158@att.com> | 2018-10-01 13:16:16 -0400 |
commit | f351db55311825662f1514259b0a9d4eff9fd25d (patch) | |
tree | 4d92b1a143a77425fe001f5738d8d2dbb86d8db8 | |
parent | 3e79c897cb6357fe0d599d104eb6a31965ca414a (diff) |
fix daily log roll bug3.0.1-ONAP3.0.0-ONAP1.4.0casablanca
Change-Id: I5c472ceafed99bb1b619c36d31371e51ad17bb4b
Issue-ID: DCAEGEN2-842
Signed-off-by: Ladue, David (dl3158) <dl3158@att.com>
-rw-r--r-- | snmptrap/snmptrapd.py | 12 |
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: |