Browse Source

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.
pull/1/head
Hidden Z 9 years ago
parent
commit
e6c301b379
  1. 1
      bin/py-i2phosts-maint

1
bin/py-i2phosts-maint

@ -91,6 +91,7 @@ for host in all_hosts: @@ -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

Loading…
Cancel
Save