mirror of https://github.com/Bing-su/adetailer.git
fix: use mock.patch on total_tqdm patch
parent
06100063b3
commit
941b7c7dfb
|
|
@ -49,12 +49,8 @@ def disable_safe_unpickle():
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def pause_total_tqdm():
|
def pause_total_tqdm():
|
||||||
orig = opts.data.get("multiple_tqdm", True)
|
with patch.dict(opts.data, {"multiple_tqdm": False}, clear=False):
|
||||||
try:
|
|
||||||
opts.data["multiple_tqdm"] = False
|
|
||||||
yield
|
yield
|
||||||
finally:
|
|
||||||
opts.data["multiple_tqdm"] = orig
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue