mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
clean-up .old folder if an exception happens
Fixes: openSUSE/obs-build#920
This commit is contained in:
parent
6e4fcfe315
commit
a01d2a43df
@ -444,8 +444,10 @@ class Serviceinfo:
|
||||
msg = f'"{old_dir}" exists, please remove it'
|
||||
raise oscerr.OscIOError(None, msg)
|
||||
|
||||
result = self._execute(dir, old_dir, callmode, singleservice, verbose)
|
||||
shutil.rmtree(old_dir)
|
||||
try:
|
||||
result = self._execute(dir, old_dir, callmode, singleservice, verbose)
|
||||
finally:
|
||||
shutil.rmtree(old_dir)
|
||||
return result
|
||||
|
||||
def _execute(
|
||||
|
Loading…
Reference in New Issue
Block a user