From f5ac972e92fd8e5f3528006fbf3554c35e84c569 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Thu, 20 Jan 2011 09:00:00 +0100 Subject: [PATCH] Exit with error if we have no lang-table --- src/pylorax/installtree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index 5804fba9..062c49de 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -54,6 +54,10 @@ class LoraxInstallTree(BaseLoraxClass): # get locales we need to keep langtable = joinpaths(self.root, "usr/share/anaconda/lang-table") + if not os.path.exists(langtable): + logger.critical("could not find anaconda lang-table, exiting") + sys.exit(1) + with open(langtable, "r") as fobj: langs = fobj.readlines()