summaryrefslogtreecommitdiffstats
path: root/rpmbuild-remote.py
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-09-08 22:12:01 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-09-08 22:12:01 -0400
commita850ddeac7376b0f1a63dc269746197f2e56788c (patch)
tree884262baa407cda377062ddd1455e6afab20be52 /rpmbuild-remote.py
parent5d737463b750dd9e0767642de1afea6a5bac1bb1 (diff)
downloadrpmbuild-remote-a850ddeac7376b0f1a63dc269746197f2e56788c.zip
rpmbuild-remote-a850ddeac7376b0f1a63dc269746197f2e56788c.tar.gz
rpmbuild-remote-a850ddeac7376b0f1a63dc269746197f2e56788c.tar.xz
Add function to send files to the server
Diffstat (limited to 'rpmbuild-remote.py')
-rw-r--r--rpmbuild-remote.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index 271a38f..1dcadb5 100644
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -103,6 +103,12 @@ def read_preferences(opts):
system['port'] = opts.port
return system
+def send_files(session, files, dest):
+ sftp = session.open_sftp()
+ for file in files:
+ LOG.info("Writing %s to server (%s)" % (file, dest))
+ sftp.put(file, dest)
+
def execute_jobs(opts, system, jobs):
session = paramiko.SSHClient()
session.connect(system['host'], port=system['port'],