From: Tony Mack Date: Fri, 10 Apr 2009 02:33:40 +0000 (+0000) Subject: formatting X-Git-Tag: sfa-0.9-0@14641~499 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e77e7d672bbbb2ba5ebb5ca854c36661715be55e;p=sfa.git formatting --- diff --git a/geni/util/config.py b/geni/util/config.py index 4a200231..8d1a0033 100644 --- a/geni/util/config.py +++ b/geni/util/config.py @@ -33,29 +33,30 @@ class Config: def __init__(self, file = "/usr/share/geniwrapper/util/geni_config"): # Load plc_config - loaded = False - path = os.path.dirname(os.path.abspath(__file__)) - filename = file.split(os.sep)[-1] - alt_file = path + os.sep + filename - myplc_file = myplc + os.sep + filename - files = [file, alt_file, myplc_file] + loaded = False + path = os.path.dirname(os.path.abspath(__file__)) + filename = file.split(os.sep)[-1] + alt_file = path + os.sep + filename + myplc_file = myplc + os.sep + filename + files = [file, alt_file, myplc_file] - for file in files: - try: - execfile(file, self.__dict__) - loaded = True - except: - pass + for file in files: + try: + execfile(file, self.__dict__) + loaded = True + except: + pass - if not loaded: - raise Exception, "Could not find config in " + ", ".join(files) + if not loaded: + raise Exception, "Could not find config in " + ", ".join(files) + # set up some useful variables def load(self, file): - try: - execfile(file, self.__dict__) - except: - raise Exception, "Could not find config in " + file + try: + execfile(file, self.__dict__) + except: + raise Exception, "Could not find config in " + file plcConfig = Config("/etc/planetlab/plc_config")