cleanup for config - again
[sfa.git] / sfa / plc / api.py
index fefb5bf..1906be4 100644 (file)
@@ -117,8 +117,6 @@ class GeniAPI:
         self.credential = None
         self.plshell = self.getPLCShell()
         self.plshell_version = self.getPLCShellVersion()
-        self.basedir = self.config.SFA_BASE_DIR + os.sep
-        self.server_basedir = self.basedir + os.sep + "geni" + os.sep
         self.hrn = self.config.SFA_INTERFACE_HRN
         self.time_format = "%Y-%m-%d %H:%M:%S"
 
@@ -167,7 +165,7 @@ class GeniAPI:
         Get our credential from a remote registry using a geniclient connection
         """
         type = 'authority'
-        path = self.config.config_path
+        path = self.config.SFA_BASE_DIR
         filename = ".".join([self.interface, self.hrn, type, "cred"])
         cred_filename = path + os.sep + filename
         try:
@@ -226,7 +224,7 @@ class GeniAPI:
         # see if this file exists
         # XX This is really the aggregate's credential. Using this is easier than getting
         # the registry's credential from iteslf (ssl errors).   
-        ma_cred_filename = self.server_basedir + os.sep + self.interface + self.hrn + ".ma.cred"
+        ma_cred_filename = self.config.SFA_BASE_DIR + os.sep + self.interface + self.hrn + ".ma.cred"
         try:
             self.credential = Credential(filename = ma_cred_filename)
         except IOError: