From b935582f6db5c2b0dab2974afcce89cb16092f6f Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 5 Apr 2009 13:51:17 +0200 Subject: [PATCH] entropy.const: const_read_equo_settings removed, parser is being moved to SystemSettings --- libraries/entropy/const.py | 76 -------------------------------------- 1 file changed, 76 deletions(-) diff --git a/libraries/entropy/const.py b/libraries/entropy/const.py index f0e347918..f317cd95b 100644 --- a/libraries/entropy/const.py +++ b/libraries/entropy/const.py @@ -849,82 +849,6 @@ def const_read_entropy_release(): myrev = rev_f.readline().strip() etpConst['entropyversion'] = myrev -def const_read_equo_settings(): - - """ - XXX: will be probably moved away from here in future. - Setup Equo settings reading them from equo config file - specified in etpConst['clientconf'], by default (client.conf) - - @return None - """ - - equo_conf = etpConst['clientconf'] - if not (os.path.isfile(equo_conf) and os.access(equo_conf, os.R_OK)): - return - - equo_f = open(equo_conf,"r") - equoconf = [x.strip() for x in equo_f.readlines() if \ - x.strip() and not x.strip().startswith("#")] - equo_f.close() - for line in equoconf: - - if line.startswith("loglevel|") and \ - (len(line.split("loglevel|")) == 2): - - loglevel = line.split("loglevel|")[1] - try: - loglevel = int(loglevel) - except (ValueError,): - pass - if (loglevel > -1) and (loglevel < 3): - etpConst['equologlevel'] = loglevel - - elif line.startswith("filesbackup|") and \ - (len(line.split("|")) == 2): - - compatopt = line.split("|")[1].strip() - if compatopt.lower() in ("disable", "disabled", - "false", "0", "no",): - etpConst['filesbackup'] = False - - elif line.startswith("ignore-spm-downgrades|") and \ - (len(line.split("|")) == 2): - - compatopt = line.split("|")[1].strip() - if compatopt.lower() in ("enable", "enabled", "true", "1", "yes"): - etpConst['spm']['ignore-spm-downgrades'] = True - - elif line.startswith("collisionprotect|") and \ - (len(line.split("|")) == 2): - - collopt = line.split("|")[1].strip() - if collopt.lower() in ("0", "1", "2",): - etpConst['collisionprotect'] = int(collopt) - - elif line.startswith("configprotect|") and \ - (len(line.split("|")) == 2): - - configprotect = line.split("|")[1].strip() - for myprot in configprotect.split(): - etpConst['configprotect'].append( - unicode(myprot,'raw_unicode_escape')) - - elif line.startswith("configprotectmask|") and \ - (len(line.split("|")) == 2): - - configprotect = line.split("|")[1].strip() - for myprot in configprotect.split(): - etpConst['configprotectmask'].append( - unicode(myprot,'raw_unicode_escape')) - - elif line.startswith("configprotectskip|") and \ - (len(line.split("|")) == 2): - configprotect = line.split("|")[1].strip() - for myprot in configprotect.split(): - etpConst['configprotectskip'].append( - etpConst['systemroot']+unicode(myprot,'raw_unicode_escape')) - def const_setup_entropy_pid(just_read = False):