From 386d9d60bcf26975fd2a11fcab0bff316f33cb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=AF?= Date: Fri, 16 Jun 2023 18:12:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8DI7E53Q=20currentTime=20--?= =?UTF-8?q?>current=5Ftime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gspylib/threads/SshTool.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/script/gspylib/threads/SshTool.py b/script/gspylib/threads/SshTool.py index 584fa9d..f3cc4b0 100644 --- a/script/gspylib/threads/SshTool.py +++ b/script/gspylib/threads/SshTool.py @@ -76,28 +76,28 @@ class SshTool(): self._finalizer = weakref.finalize(self, self.clenSshResultFiles) self.__sessions = {} - currentTime = str(datetime.datetime.now()).replace(" ", "_").replace( + current_time = str(datetime.datetime.now()).replace(" ", "_").replace( ".", "_") randomnum = ''.join(sample('0123456789', 3)) # can tmp path always access? if key == "": self.__hostsFile = "/tmp/gauss_hosts_file_%d_%s_%s" % ( - self.__pid, currentTime, randomnum) + self.__pid, current_time, randomnum) self.__resultFile = "/tmp/gauss_result_%d_%s_%s.log" % ( - self.__pid, currentTime, randomnum) + self.__pid, current_time, randomnum) self.__outputPath = "/tmp/gauss_output_files_%d_%s_%s" % ( - self.__pid, currentTime, randomnum) + self.__pid, current_time, randomnum) self.__errorPath = "/tmp/gauss_error_files_%d_%s_%s" % ( - self.__pid, currentTime, randomnum) + self.__pid, current_time, randomnum) else: self.__hostsFile = "/tmp/gauss_hosts_file_%d_%s_%s_%s" % ( - self.__pid, key, currentTime, randomnum) + self.__pid, key, current_time, randomnum) self.__resultFile = "/tmp/gauss_result_%d_%s_%s_%s.log" % ( - self.__pid, key, currentTime, randomnum) + self.__pid, key, current_time, randomnum) self.__outputPath = "/tmp/gauss_output_files_%d_%s_%s_%s" % ( - self.__pid, key, currentTime, randomnum) + self.__pid, key, current_time, randomnum) self.__errorPath = "/tmp/gauss_error_files_%d_%s_%s_%s" % ( - self.__pid, key, currentTime, randomnum) + self.__pid, key, current_time, randomnum) self.__resultStatus = {} if logFile is None: