updated default path and search path for geni_config
authorTony Mack <tmack@cs.princeton.edu>
Fri, 1 May 2009 01:41:24 +0000 (01:41 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Fri, 1 May 2009 01:41:24 +0000 (01:41 +0000)
geni/util/api.py
geni/util/config.py

index 9b19010..a7486de 100644 (file)
@@ -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
index 8d1a003..6ce9e4e 100644 (file)
@@ -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: