From e6c301b379f9cf7933a42c08e0794d5e3c826ac0 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Mon, 16 Nov 2015 19:15:36 +0000 Subject: [PATCH] py-i2phosts-maint: fix rare situation with expires If new calculated expires is in the past in relation to current datetime, it was caused an exception. --- bin/py-i2phosts-maint | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/py-i2phosts-maint b/bin/py-i2phosts-maint index e98c030..70992ab 100755 --- a/bin/py-i2phosts-maint +++ b/bin/py-i2phosts-maint @@ -91,6 +91,7 @@ for host in all_hosts: if host.expires == None: # workaround for situation when we updating expires first time expires_current = datetime.datetime.utcnow().date() + host.expires = expires_current else: expires_current = host.expires # calculate new expiration date