mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46:13 +01:00
Merge pull request #1301 from marxin/fix-old-folder
clean-up .old folder if an exception happens
This commit is contained in:
commit
e299ab98bd
@ -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