Skip to content

Commit 700ffd5

Browse files
author
Kincaid Savoie
committed
Made code a bit more concise.
1 parent 13eae16 commit 700ffd5

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
@@ -287,10 +286,7 @@ def copy_file(self, local_file, remote_file):
287286
local_file, self.host, remote_file)
288287
else:
289288
file_list = os.listdir(local_file)
290-
local_files = []
291-
remote_files = []
292289
for file_name in file_list:
293-
local_files.append(os.path.join(local_file, file_name))
294-
remote_files.append(os.path.join(remote_file, file_name))
295-
for local_path, remote_path in itertools.izip(local_files, remote_files):
290+
local_path = os.path.join(local_file, file_name)
291+
remote_path = os.path.join(remote_file, file_name)
296292
self.copy_file(local_path, remote_path)

0 commit comments

Comments
 (0)