#2058 Add callback to waiter

Open Josip Delic delijati
Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -291,10 +291,13 @@
Loading
291 291
        config = kwargs.pop('WaiterConfig', {})
292 292
        sleep_amount = config.get('Delay', self.config.delay)
293 293
        max_attempts = config.get('MaxAttempts', self.config.max_attempts)
294 +
        callback = kwargs.get('WaiterCallback')
294 295
        num_attempts = 0
295 296
296 297
        while True:
297 298
            response = self._operation_method(**kwargs)
299 +
            if callable(callback):
300 +
                callback(response)
298 301
            num_attempts += 1
299 302
            for acceptor in acceptors:
300 303
                if acceptor.matcher_func(response):

Learn more Showing 1 files with coverage changes found.

Changes in botocore/credentials.py
-3
+3
Loading file...
Files Coverage
botocore 0.03% 93.09%
Project Totals (60 files) 93.09%
Loading