summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-01-06 17:36:25 -0800
committerJesse Keating <jkeating@redhat.com>2010-01-06 17:36:25 -0800
commit6798166726bd4809c696c693d473c0fcd094afb1 (patch)
tree1fdf4607cf953ff6aaa48353af234b78177b0e03 /src
parent1552d0d886d44f911255069ac1c58f6d7249d7b9 (diff)
downloadfedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.tar.gz
fedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.tar.xz
fedora-packager-6798166726bd4809c696c693d473c0fcd094afb1.zip
Wire up mockbuild
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fedpkg.py15
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: