mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- fixed corner case in __del__ method
For a detailed explanation see
d093c2b43b
This commit is contained in:
parent
3547ef95ef
commit
8c8618ac91
@ -793,8 +793,9 @@ def main(apiurl, opts, argv):
|
||||
""" temporary directory that removes itself"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.name = mkdtemp(*args, **kwargs)
|
||||
_rmtree = staticmethod(shutil.rmtree)
|
||||
def cleanup(self):
|
||||
shutil.rmtree(self.name)
|
||||
self._rmtree(self.name)
|
||||
def __del__(self):
|
||||
self.cleanup()
|
||||
def __exit__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user