[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lorax] 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, 0 insertions(+), 18 deletions(-)

diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 7e61df6..90ed763 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 0946741..b5fe307 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
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]