修改子用户加载/etc/profile导致获取环境变量不对的问题

This commit is contained in:
zhang_xubo
2023-02-27 14:40:58 +08:00
parent a3b5486ec8
commit cace0407f8
2 changed files with 4 additions and 2 deletions

View File

@ -393,7 +393,7 @@ class SshTool():
unpathpath = os.path.dirname(os.path.realpath(__file__))
GPHOME = os.path.realpath(os.path.join(unpathpath, "../../../"))
else:
GPHOME = self.getGPHOMEPath(osProfile)
GPHOME = self.getGPHOMEPath(userProfile)
psshpre = "python3 %s/script/gspylib/pssh/bin/pssh" % GPHOME
# clean result file
@ -559,7 +559,7 @@ class SshTool():
unpathpath = os.path.dirname(os.path.realpath(__file__))
GPHOME = os.path.realpath(os.path.join(unpathpath, "../../../"))
else:
GPHOME = self.getGPHOMEPath(osProfile)
GPHOME = self.getGPHOMEPath(userProfile)
psshpre = "python3 %s/script/gspylib/pssh/bin/pssh" % GPHOME
if ssh_config:
if os.path.exists(ssh_config) and os.path.isfile(ssh_config):