We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent8052f39 commitc236959Copy full SHA for c236959
testgres/operations/remote_ops.py
@@ -52,8 +52,8 @@ def __init__(self, conn_params: ConnectionParams):
52
ifself.port:
53
self.ssh_cmd+= ["-p",self.port]
54
self.remote=True
55
-self.username=conn_params.usernameorself.get_user()
56
-self.ssh_dest=f"{self.username}@{self.host}"ifself.usernameelse"{self.host}"
+self.username=conn_params.username
+self.ssh_dest=f"{self.username}@{self.host}"ifself.usernameelseself.host
57
self.add_known_host(self.host)
58
self.tunnel_process=None
59
self.tunnel_port=None
@@ -170,10 +170,6 @@ def set_env(self, var_name: str, var_val: str):
170
"""
171
returnself.exec_command("export {}={}".format(var_name,var_val))
172
173
-# Get environment variables
174
-defget_user(self):
175
-returnself.exec_command("echo $USER",encoding=get_default_encoding()).strip()
176
-
177
defget_name(self):
178
cmd='python3 -c "import os; print(os.name)"'
179
returnself.exec_command(cmd,encoding=get_default_encoding()).strip()