From 036e4e84d7594a2f799501dc3ed173f2d6ddfcc4 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Wed, 14 Jul 2010 13:13:23 -0500 Subject: 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 --- py/mock/exception.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'py/mock/exception.py') 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: -- cgit