Fix for Python 2.6

This commit is contained in:
Matt Wright
2013-01-14 00:26:46 -05:00
parent 6adc26a897
commit e9b40a12c8
+2 -1
View File
@@ -196,7 +196,8 @@ def config_value(key, app=None, default=None):
def get_max_age(key, app=None):
now = datetime.utcnow()
expires = now + get_within_delta(key + '_WITHIN', app)
return (expires - now).total_seconds()
td = (expires - now)
return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 1e6) / 1e6
def get_within_delta(key, app=None):