gs_ssh单节点执行报错问题修复

This commit is contained in:
hangjin2020
2022-05-10 09:34:51 +08:00
parent fd52683365
commit 4969128ef2

View File

@ -736,7 +736,8 @@ class SshTool():
targetDir, self.__resultFile)
hostList = self.hostNames
if len(hostList) == 1 and hostList[0] == socket.gethostname() and \
srcFile != targetDir:
srcFile != targetDir and \
srcFile != os.path.join(targetDir, os.path.split(srcFile)[1]):
localMode = True
scpCmd = "cp -r %s %s" % (srcFile, targetDir)
else: