summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-11 23:44:17 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-11 23:44:17 -0700
commit59c4dc59a0c403f1265299d096d490b48ac53203 (patch)
tree7d4602cdddaef00436ec026da118d4ebbfdd4ddc /src/fedpkg.py
parent82e6b7c8725511a5e779405a4aa67ebfbd5a0f93 (diff)
downloadfedora-packager-59c4dc59a0c403f1265299d096d490b48ac53203.zip
fedora-packager-59c4dc59a0c403f1265299d096d490b48ac53203.tar.gz
fedora-packager-59c4dc59a0c403f1265299d096d490b48ac53203.tar.xz
Don't try to upload a file that doesn't exist
RHBZ 620254 Arguably we should also check in the library, but I'm too lazy to do that right now.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index a216abb..51ee2c8 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -548,6 +548,11 @@ def new(args):
sys.exit(1)
def new_sources(args):
+ # Check to see if the files passed exist
+ for file in args.files:
+ if not os.path.exists(file):
+ log.error('File does not exist: %s' % file)
+ sys.exit(1)
try:
mymodule = pyfedpkg.PackageModule(args.path)
mymodule.upload(args.files, replace=args.replace)