Skip to content

Commit 6d0022e

Browse files
author
Kincaid Savoie
committed
Made code a bit more concise.
1 parent 363e53d commit 6d0022e

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
@@ -315,10 +314,7 @@ def copy_file(self, local_file, remote_file):
315314
local_file, self.host, remote_file, error)
316315
else:
317316
file_list = os.listdir(local_file)
318-
local_files = []
319-
remote_files = []
320317
for file_name in file_list:
321-
local_files.append(os.path.join(local_file, file_name))
322-
remote_files.append(os.path.join(remote_file, file_name))
323-
for local_path, remote_path in itertools.izip(local_files, remote_files):
318+
local_path = os.path.join(local_file, file_name)
319+
remote_path = os.path.join(remote_file, file_name)
324320
self.copy_file(local_path, remote_path)

0 commit comments

Comments
 (0)