[Preflights][Fixed] Temporals not removed on success

This commit is contained in:
Salvador E. Tropea 2023-04-16 08:19:08 -03:00
parent 77b7abc24b
commit 1b66992088
1 changed files with 3 additions and 1 deletions

View File

@ -174,10 +174,12 @@ class BasePreFlight(Registrable):
return cmd return cmd
def exec_with_retry(self, cmd, exit_with=None): def exec_with_retry(self, cmd, exit_with=None):
remove_tmps = False
try: try:
ret = GS.exec_with_retry(cmd, exit_with) ret = GS.exec_with_retry(cmd, exit_with)
remove_tmps = True
finally: finally:
if GS.debug_enabled: if GS.debug_enabled and not remove_tmps:
if self._files_to_remove: if self._files_to_remove:
logger.error('Keeping temporal files: '+str(self._files_to_remove)) logger.error('Keeping temporal files: '+str(self._files_to_remove))
else: else: