From 4f57d574a88146369885cbe9b742b6492c74764d Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Mon, 27 Jun 2011 12:47:10 +0200 Subject: [PATCH] Remove check for required commands Not all architectures need all the commands, so the check does not work very well. --- src/pylorax/__init__.py | 7 ------- src/pylorax/constants.py | 11 ----------- 2 files changed, 18 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 7e61df6b..90ed763d 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -173,13 +173,6 @@ class Lorax(BaseLoraxClass): # do we have all lorax required commands? self.lcmds = constants.LoraxRequiredCommands() - """ - missing = self.lcmds.get_missing() - if missing: - logger.critical("missing required command: {0}".format(missing)) - sys.exit(1) - """ - # do we have a proper yum base object? logger.info("checking yum base object") if not isinstance(ybo, yum.YumBase): diff --git a/src/pylorax/constants.py b/src/pylorax/constants.py index 09467412..b5fe307a 100644 --- a/src/pylorax/constants.py +++ b/src/pylorax/constants.py @@ -59,17 +59,6 @@ class LoraxRequiredCommands(dict): def __getattr__(self, attr): return self[attr] - def get_missing(self): - missing = [] - for cmd in self.values(): - found = [joinpaths(path, cmd) for path in self.__path - if os.path.exists(joinpaths(path, cmd))] - - if not found: - missing.append(cmd) - - return missing - # kernel types K_NORMAL = 0