diff --git a/test/python/WMCore_t/Storage_t/Backends_t/GFAL2Impl_t.py b/test/python/WMCore_t/Storage_t/Backends_t/GFAL2Impl_t.py index 9c856611f74..4c71abc8c3f 100644 --- a/test/python/WMCore_t/Storage_t/Backends_t/GFAL2Impl_t.py +++ b/test/python/WMCore_t/Storage_t/Backends_t/GFAL2Impl_t.py @@ -112,15 +112,17 @@ def getStageOutCommandResult(self, copyCommandDict, createRemoveFileCommandResul EXIT_STATUS=$? echo "gfal-copy exit status: $EXIT_STATUS" if [[ $EXIT_STATUS != 0 ]]; then - echo "ERROR: gfal-copy exited with $EXIT_STATUS" - echo "Cleaning up failed file:" - %s + echo "ERROR: gfal-copy exited with $EXIT_STATUS" + echo "Cleaning up failed file:" + {remove_command} fi exit $EXIT_STATUS - """ % createRemoveFileCommandResult - + """.format( + remove_command=createRemoveFileCommandResult + ) + return result - + @mock.patch('WMCore.Storage.Backends.GFAL2Impl.os.path') @mock.patch('WMCore.Storage.StageOutImpl.StageOutImpl.executeCommand') def testRemoveFile_isFile(self, mock_executeCommand, mock_path):