'Check the given verb/user/user triplet for limit.
@return: Tuple of delay (in seconds) and error message (or None, None)'

def check_for_delay(self, verb, url, username=None):

    delays = []
    for limit in self.levels[username]:
        delay = limit(verb, url)
        if delay:
            delays.append((delay, limit.error_message))
    if delays:
        delays.sort()
        return delays[0]
    return (None, None)
