Skip to content

Commit 9c4bb70

Browse files
author
Kincaid Savoie
committed
Made code a bit more concise.
1 parent 1c50939 commit 9c4bb70

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pssh/ssh_client.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import logging
2626
import paramiko
2727
import os
28-
import itertools
2928
from socket import gaierror as sock_gaierror, error as sock_error
3029
from .exceptions import UnknownHostException, AuthenticationException, \
3130
ConnectionErrorException, SSHException
@@ -293,10 +292,7 @@ def copy_file(self, local_file, remote_file):
293292
local_file, self.host, remote_file, error)
294293
else:
295294
file_list = os.listdir(local_file)
296-
local_files = []
297-
remote_files = []
298295
for file_name in file_list:
299-
local_files.append(os.path.join(local_file, file_name))
300-
remote_files.append(os.path.join(remote_file, file_name))
301-
for local_path, remote_path in itertools.izip(local_files, remote_files):
296+
local_path = os.path.join(local_file, file_name)
297+
remote_path = os.path.join(remote_file, file_name)
302298
self.copy_file(local_path, remote_path)

0 commit comments

Comments
 (0)