Project

General

Profile

0001-python3-make-the-exp-retry-timeout-seconds_to_wait-r.patch

Paul Marillonnet, 06 Mar 2019 08:12 PM

Download (1.19 KB)

View differences:

Subject: [PATCH] python3: make the exp retry timeout 'seconds_to_wait' return
 an int (#31166)

 src/authentic2/exponential_retry_timeout.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
src/authentic2/exponential_retry_timeout.py
35 35
           done.
36 36
        '''
37 37
        key = self.key(keys)
38
        if not self.duration:
39
            return
40
        now = time.time()
41
        what = cache.get(key)
42
        if what and what[1] > now:
43
            return what[1] - now
38
        if self.duration:
39
            now = time.time()
40
            what = cache.get(key)
41
            if what and what[1] > now:
42
                return what[1] - now
43
        return 0
44 44

  
45 45
    def success(self, *keys):
46 46
        '''Signal an action success, delete exponential backoff cache.
47
-