Message405499
just want to correct code that Nils post in the last comment to really take args and kwargs
~~~
def mkdtemp_persistent(*args, persistent=True, **kwargs):
if persistent:
@contextmanager
def normal_mkdtemp():
yield tempfile.mkdtemp(*args, **kwargs)
return normal_mkdtemp()
else:
return tempfile.TemporaryDirectory(*args, **kwargs)
with mkdtemp_persistent(persistent=False) as dir:
...
~~~ |
|
| Date |
User |
Action |
Args |
| 2021-11-02 10:35:39 | beliaev-maksim | set | recipients:
+ beliaev-maksim, georg.brandl, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, maurosr, Anthony Sottile, epicfaace, CAM-Gerlach, Nils Kattenbeck, alexia |
| 2021-11-02 10:35:39 | beliaev-maksim | set | messageid: <[email protected]> |
| 2021-11-02 10:35:39 | beliaev-maksim | link | issue25024 messages |
| 2021-11-02 10:35:39 | beliaev-maksim | create | |
|