From d36e9ea5bc55d189735ef9f55433ffff5b52550a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 23 Jun 2010 21:53:30 -0700 Subject: Move import_srpm out of the class This is so that we can use it before we have a full fledged module to deal with, like creating something local to play with. --- src/fedpkg.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 1c1f0af..6e12776 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -441,17 +441,17 @@ def import_srpm(args): if not args.create: try: mymodule = pyfedpkg.PackageModule(args.path) - if not mymodule.import_srpm(args.srpm): - print("New content staged and new sources uploaded.") - print("Review with: git diff --cached") - print("Commit if happy or revert with: git reset --hard HEAD") - return - else: - log.error("Unable to import srpm") - sys.exit(1) + uploadfiles = pyfedpkg.import_srpm(mymodule.repo, args.srpm) except pyfedpkg.FedpkgError, e: log.error('Could import srpm: %s' % e) sys.exit(1) + # replace this system call with a proper diff target when it is + # readys + os.system('GIT_PAGER='' git diff --cached') + print('--------------------------------------------') + print("New content staged and new sources uploaded.") + print("Commit if happy or revert with: git reset --hard HEAD") + return def install(args): arch = None -- cgit