summaryrefslogtreecommitdiffstats
path: root/rpmbuild-remote.py
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-09-08 22:28:47 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-09-08 22:28:47 -0400
commitf3d5efa2e21940305c07e3ce75f8883f50cfffe9 (patch)
treed4110ccc228d4de79c0958a50851be5b77d28200 /rpmbuild-remote.py
parentae7913fbe84bfdb78d87ce899de599240926e380 (diff)
downloadrpmbuild-remote-f3d5efa2e21940305c07e3ce75f8883f50cfffe9.tar.gz
rpmbuild-remote-f3d5efa2e21940305c07e3ce75f8883f50cfffe9.tar.xz
rpmbuild-remote-f3d5efa2e21940305c07e3ce75f8883f50cfffe9.zip
Function for getting files from the server
Diffstat (limited to 'rpmbuild-remote.py')
-rw-r--r--rpmbuild-remote.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index 4d5e9fe..d537979 100644
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -109,6 +109,13 @@ def send_files(session, files, dest):
sftp.put(file, dest)
sftp.close()
+def get_files(session, files, dest):
+ sftp = session.open_sftp()
+ for file in files:
+ LOG.info("Fetching %s from server" % file)
+ sftp.get(file, dest)
+ sftp.close()
+
def execute_jobs(opts, system, jobs):
session = paramiko.SSHClient()
LOG.info("Connecting to %(user)s@%(host)s:%(port)d" % system)