From 13f45e07aa3c5ed6be9651f1879710d5c67dcdfa Mon Sep 17 00:00:00 2001 From: sfinlon Date: Fri, 1 Nov 2019 13:09:05 -0400 Subject: [PATCH] fix two old arrow references --- csirtg_smrt/archiver.py | 2 +- csirtg_smrt/smrt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csirtg_smrt/archiver.py b/csirtg_smrt/archiver.py index f85ee2b..98f2908 100644 --- a/csirtg_smrt/archiver.py +++ b/csirtg_smrt/archiver.py @@ -227,7 +227,7 @@ def create(self, indicator): def cleanup(self, days=CLEANUP_DAYS): days = int(days) date = arrow.utcnow() - date = date.replace(days=-days) + date = date.shift(days=-days) s = self.begin() count = s.query(Indicator).filter(Indicator.created_at < date.datetime).delete() diff --git a/csirtg_smrt/smrt.py b/csirtg_smrt/smrt.py index cac7a8d..311e78f 100644 --- a/csirtg_smrt/smrt.py +++ b/csirtg_smrt/smrt.py @@ -443,7 +443,7 @@ def main(): goback = args.goback if goback: - goback = arrow.utcnow().replace(days=-int(goback)) + goback = arrow.utcnow().shift(days=-int(goback)) if not args.service: data = None