Merge "ring: Have RingBuilder.debug return to old state"

This commit is contained in:
Zuul 2022-12-01 19:28:08 +00:00 committed by Gerrit Code Review
commit 6d600bef0c
1 changed files with 2 additions and 2 deletions

View File

@ -183,11 +183,11 @@ class RingBuilder(object):
with rb.debug():
rb.rebalance()
"""
self.logger.disabled = False
old_val, self.logger.disabled = self.logger.disabled, False
try:
yield
finally:
self.logger.disabled = True
self.logger.disabled = old_val
@property
def min_part_seconds_left(self):