summaryrefslogtreecommitdiffstats
path: root/py/mock/exception.py
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2010-07-14 13:13:23 -0500
committerClark Williams <williams@redhat.com>2010-07-27 13:57:11 -0500
commit036e4e84d7594a2f799501dc3ed173f2d6ddfcc4 (patch)
tree683e53e78e3355a1c7c08e13287e2e8402ab51a4 /py/mock/exception.py
parent46c69a9d452ef5d8d854694d1bc1bc1ebe9971e5 (diff)
downloadmock-036e4e84d7594a2f799501dc3ed173f2d6ddfcc4.tar.gz
mock-036e4e84d7594a2f799501dc3ed173f2d6ddfcc4.tar.xz
mock-036e4e84d7594a2f799501dc3ed173f2d6ddfcc4.zip
added logic to detect invalid architecture combinations (BZ# 607144)
Modified py/mock.py to dectect invalid build combinations (e.g. trying to build x86_64 packages on an i386 host) and to throw an InvalidArchitecture exception when detected. Added the above exception to py/mock/execption.py Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'py/mock/exception.py')
-rw-r--r--py/mock/exception.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/mock/exception.py b/py/mock/exception.py
index 16fcbff..d28fdf2 100644
--- a/py/mock/exception.py
+++ b/py/mock/exception.py
@@ -78,6 +78,13 @@ class BadCmdline(Error):
self.msg = msg
self.resultcode = 05
+class InvalidArchitecture(Error):
+ "invalid host/target architecture specified."
+ def __init(self, msg):
+ Error.__init__(self, msg)
+ self.msg = msg
+ self.resultcode = 06
+
class ResultDirNotAccessible(Error):
"""
Could not create output directory for built rpms. The directory specified was: