diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-01-06 17:36:25 -0800 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-01-06 17:36:25 -0800 |
commit | 6798166726bd4809c696c693d473c0fcd094afb1 (patch) | |
tree | 1fdf4607cf953ff6aaa48353af234b78177b0e03 /src | |
parent | 1552d0d886d44f911255069ac1c58f6d7249d7b9 (diff) | |
download | fedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.tar.gz fedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.tar.xz fedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.zip |
Wire up mockbuild
Diffstat (limited to 'src')
-rwxr-xr-x | src/fedpkg.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py index e0ea9e6..8af9365 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -126,8 +126,19 @@ def local(args): sys.exit(1) def mockbuild(args): - # not implimented - log.warning('Not implimented yet, got %s' % args) + # Pick up any mockargs from the env + mockargs = [] + try: + mockargs = os.environ['MOCKARGS'].split() + except KeyError: + # there were no args + pass + try: + mymodule = fedpkg.PackageModule(args.path) + return mymodule.mockbuild(mockargs) + except fedpkg.FedpkgError, e: + log.error('Could not run mockbuild: %s' % e) + sys.exit(1) def new(args): try: |