From: Robin H. Johnson Date: Wed, 27 May 2009 15:44:21 +0000 (-0700) Subject: Normalize spaces and tabs: modules/catalyst/util.py X-Git-Tag: CATALYST-2.0.10~3^2~130 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=902f53aeff350245bfac295d04278f92a3b0293b;p=catalyst.git Normalize spaces and tabs: modules/catalyst/util.py --- diff --git a/modules/catalyst/util.py b/modules/catalyst/util.py index 4c2b0382..078cbfb7 100644 --- a/modules/catalyst/util.py +++ b/modules/catalyst/util.py @@ -126,15 +126,15 @@ def file_locate(settings, filelist, expand=True): for myfile in filelist: if myfile in settings: # filenames such as cdtar are optional, so we don't assume the variable is defined. - if not len(settings[myfile]): - raise CatalystError, "File variable \"" + myfile + "\" has a length of zero (not specified)" - if settings[myfile].startswith('/'): - if not os.path.exists(settings[myfile]): - raise CatalystError, "Cannot locate specified " + myfile + ": " + settings[myfile] - elif expand and os.path.exists(os.getcwd() + "/" + settings[myfile]): - settings[myfile] = os.getcwd() + "/" + settings[myfile] - else: - raise CatalystError, "Cannot locate specified " + myfile + ": " + settings[myfile] + " (2nd try)" + if not len(settings[myfile]): + raise CatalystError, "File variable \"" + myfile + "\" has a length of zero (not specified)" + if settings[myfile].startswith('/'): + if not os.path.exists(settings[myfile]): + raise CatalystError, "Cannot locate specified " + myfile + ": " + settings[myfile] + elif expand and os.path.exists(os.getcwd() + "/" + settings[myfile]): + settings[myfile] = os.getcwd() + "/" + settings[myfile] + else: + raise CatalystError, "Cannot locate specified " + myfile + ": " + settings[myfile] + " (2nd try)" def parse_makeconf(mylines): mymakeconf={} @@ -154,8 +154,8 @@ def parse_makeconf(mylines): mobj=pat.match(myline) pos += 1 if mobj.group(2): - clean_string = re.sub(r"\"",r"",mobj.group(2)) - mymakeconf[mobj.group(1)]=clean_string + clean_string = re.sub(r"\"",r"",mobj.group(2)) + mymakeconf[mobj.group(1)]=clean_string return mymakeconf def read_makeconf(mymakeconffile):