Projet

Général

Profil

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

Paul Marillonnet, 06 mars 2019 20:12

Télécharger (1,19 ko)

Voir les différences:

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
-