Exit with error if we have no lang-table

This commit is contained in:
Martin Gracik 2011-01-20 09:00:00 +01:00
parent 58d5ecf2a7
commit f5ac972e92
1 changed files with 4 additions and 0 deletions

View File

@ -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()