diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-07-06 15:10:04 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-07-06 15:10:04 -0700 |
commit | 31d33995d14e49ac02e49998f21fdf8ab64af655 (patch) | |
tree | 34e0e8413a8e9fbb7fbe55f3d589a93fa35fa474 | |
parent | b76d7db1ea06520a738a87f8808ae7493441a375 (diff) | |
download | fedora-packager-31d33995d14e49ac02e49998f21fdf8ab64af655.tar.gz fedora-packager-31d33995d14e49ac02e49998f21fdf8ab64af655.tar.xz fedora-packager-31d33995d14e49ac02e49998f21fdf8ab64af655.zip |
Use curl directly for file uploads.
This is the easy way out until we have a progress bar support via the
pycurl method.
-rw-r--r-- | src/pyfedpkg/__init__.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index c128844..e958722 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1128,7 +1128,18 @@ class PackageModule: else: # Ensure the new file is readable: os.chmod(f, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH) - lookaside.upload_file(self.module, f, file_hash) + #lookaside.upload_file(self.module, f, file_hash) + # For now don't use the pycurl upload function as it does + # not produce any progress output. Cheat and use curl + # directly. + # This command is stolen from the dist-cvs make file + # It assumes and hard codes the cert file name/location + cmd = ['curl', '-k', '--cert', + os.path.expanduser('~/.fedora.cert'), '--fail', '-o', + '/dev/null', '--show-error', '--progress-bar', '-F', + 'name=%s' % self.module, '-F', 'md5sum=%s' % file_hash, + '-F', 'file=@%s' % f, LOOKASIDE_CGI] + _run_command(cmd) sources_file.close() |