1.1 --- a/imiptools/handlers/scheduling/quota.py Mon Feb 08 22:43:55 2016 +0100
1.2 +++ b/imiptools/handlers/scheduling/quota.py Mon Feb 08 23:24:09 2016 +0100
1.3 @@ -99,10 +99,10 @@
1.4
1.5 total = _get_duration(handler)
1.6
1.7 - # Reject indefinitely recurring events.
1.8 + # Allow indefinitely recurring events.
1.9
1.10 if total == Endless():
1.11 - return
1.12 + total = None
1.13
1.14 # Obtain the journal entries and limits.
1.15
1.16 @@ -193,7 +193,7 @@
1.17 'recurrenceid' with the given 'duration' and 'expiry' time.
1.18 """
1.19
1.20 - confirmed = _find_applicable_entry(entries, uid, recurrenceid, duration)
1.21 + confirmed = _find_applicable_entry(entries, uid, recurrenceid)
1.22
1.23 # Where a previous entry still applies, retract it if different.
1.24
1.25 @@ -216,22 +216,22 @@
1.26 'uid' and 'recurrenceid' with the given 'duration'.
1.27 """
1.28
1.29 - confirmed = _find_applicable_entry(entries, uid, recurrenceid, duration)
1.30 + confirmed = _find_applicable_entry(entries, uid, recurrenceid)
1.31
1.32 # Where a previous entry still applies, retract it.
1.33
1.34 if confirmed:
1.35 found_uid, found_recurrenceid, found_duration, found_expiry = confirmed
1.36 entries.append((found_uid, found_recurrenceid, "-%s" % found_duration, found_expiry))
1.37 - return found_duration == duration
1.38 + return True
1.39
1.40 return False
1.41
1.42 -def _find_applicable_entry(entries, uid, recurrenceid, duration):
1.43 +def _find_applicable_entry(entries, uid, recurrenceid):
1.44
1.45 """
1.46 Within 'entries', find any applicable previous entry for this event,
1.47 - using the 'uid', 'recurrenceid' and 'duration'.
1.48 + using the 'uid' and 'recurrenceid'.
1.49 """
1.50
1.51 confirmed = None