Skip to content

Commit b96f97f

Browse files
Kincaid Savoiepkittenis
authored andcommitted
Switched from "+" for concatenation to "join" for performance.
1 parent 34bf0a7 commit b96f97f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pssh/pssh_client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -870,11 +870,6 @@ def copy_file_to_local(self, remote_file, local_file):
870870
Local directories in `local_file` that do not exist will be
871871
created as long as permissions allow.
872872
873-
.. note ::
874-
Path separation is handled client side so it is possible to copy
875-
to/from hosts with differing path separators, like from/to Linux
876-
and Windows.
877-
878873
.. note ::
879874
File names will be de-duplicated by appending the hostname to the
880875
filepath.
@@ -892,4 +887,4 @@ def _copy_file_to_local(self, host, remote_file, local_file):
892887
password=self.password,
893888
port=self.port, pkey=self.pkey,
894889
forward_ssh_agent=self.forward_ssh_agent)
895-
return self.host_clients[host].copy_file_to_local(remote_file, local_file + '_' + host)
890+
return self.host_clients[host].copy_file_to_local(remote_file, '_'.join([local_file, host]))

0 commit comments

Comments
 (0)