diff --git a/pilot/api/data.py b/pilot/api/data.py index b5b96005..23831cc6 100644 --- a/pilot/api/data.py +++ b/pilot/api/data.py @@ -633,7 +633,8 @@ def transfer(self, files: list, activity: list or str = 'default', raise_excepti code = ErrorCodes.STAGEINFAILED if self.mode == 'stage-in' else ErrorCodes.STAGEOUTFAILED # is it stage-in/out? details = str(caught_errors) + ":" + f'failed to transfer files using copytools={copytools}' self.logger.fatal(details) - raise PilotException(details, code=code) + if raise_exception: + raise PilotException(details, code=code) return files