1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-12 02:04:04 +02:00

Merge pull request #1301 from marxin/fix-old-folder

clean-up .old folder if an exception happens
This commit is contained in:
2023-04-17 14:22:38 +02:00
committed by GitHub

View File

@@ -444,7 +444,9 @@ class Serviceinfo:
msg = f'"{old_dir}" exists, please remove it' msg = f'"{old_dir}" exists, please remove it'
raise oscerr.OscIOError(None, msg) raise oscerr.OscIOError(None, msg)
try:
result = self._execute(dir, old_dir, callmode, singleservice, verbose) result = self._execute(dir, old_dir, callmode, singleservice, verbose)
finally:
shutil.rmtree(old_dir) shutil.rmtree(old_dir)
return result return result