[sysadmin-bin] Pass the expected argument over to relativedelta
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Pass the expected argument over to relativedelta
- Date: Fri, 25 Feb 2022 12:29:36 +0000 (UTC)
commit 5c9e665bc6b837c2e49830cef70b5a724a974efa
Author: Andrea Veri <averi redhat com>
Date: Fri Feb 25 13:29:28 2022 +0100
Pass the expected argument over to relativedelta
membership/foundation-operations.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index c1674b9..81a63a2 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -70,7 +70,12 @@ def send_renewal_emails():
def rtdelta_wrap(t, a):
import dateutil.relativedelta as relativedelta
- return relativedelta.relativedelta(t=a)
+ if t == 'years':
+ return relativedelta.relativedelta(years=a)
+ elif t == 'months':
+ return relativedelta.relativedelta(months=a)
+ elif t == 'days':
+ return relativedelta.relativedelta(days=a)
def cleanup_mailgrace():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]