1
0
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:
Marcus Huewe 2015-01-03 13:06:12 +01:00
parent 3547ef95ef
commit 8c8618ac91

View File

@ -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):