From: Tony Mack Date: Fri, 1 May 2009 01:41:24 +0000 (+0000) Subject: updated default path and search path for geni_config X-Git-Tag: sfa-0.9-0@14641~433 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1382a515f18d2df42facdcffcc7e8f2651f9dc42;p=sfa.git updated default path and search path for geni_config --- diff --git a/geni/util/api.py b/geni/util/api.py index 9b190104..a7486de5 100644 --- a/geni/util/api.py +++ b/geni/util/api.py @@ -97,7 +97,7 @@ class GeniAPI: # flat list of method names methods = geni.methods.methods - def __init__(self, config = "/usr/share/geniwrapper/geni/util/geni_config", encoding = "utf-8", peer_cert = None, interface = None, key_file = None, cert_file = None): + def __init__(self, config = "/etc/geni/geni_config", encoding = "utf-8", peer_cert = None, interface = None, key_file = None, cert_file = None): self.encoding = encoding # Better just be documenting the API diff --git a/geni/util/config.py b/geni/util/config.py index 8d1a0033..6ce9e4e8 100644 --- a/geni/util/config.py +++ b/geni/util/config.py @@ -23,6 +23,7 @@ import sys # in site-packages. myplc = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + \ os.sep + "myplc" +geni = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))+ os.sep + "geni" class Config: """ @@ -30,14 +31,14 @@ class Config: fast but no type conversions. """ - def __init__(self, file = "/usr/share/geniwrapper/util/geni_config"): + def __init__(self, file = "/etc/geni/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 + alt_file = path + os.sep + 'util' + os.sep + filename + geni_file = geni + os.sep + 'util' + os.sep + filename files = [file, alt_file, myplc_file] for file in files: