Normalize spaces and tabs: modules/catalyst/util.py
authorRobin H. Johnson <robbat2@orbis-terrarum.net>
Wed, 27 May 2009 15:44:21 +0000 (08:44 -0700)
committerRobin H. Johnson <robbat2@orbis-terrarum.net>
Wed, 27 May 2009 15:44:21 +0000 (08:44 -0700)
modules/catalyst/util.py

index 4c2b03827963c70c212d26835950bf6923b59ef6..078cbfb72783d116b3651031c4ba1ee34592089d 100644 (file)
@@ -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):