remove dependency of Config module from TrustedRoots class
[sfa.git] / sfa / plc / sfaImport.py
index e3e7844..3323080 100644 (file)
@@ -52,7 +52,7 @@ class sfaImport:
 
     def __init__(self):
         self.AuthHierarchy = Hierarchy()
-        self.TrustedRoots = TrustedRootList()
+        self.TrustedRoots = TrustedRootList(Config.get_trustedroots_dir())
 
         self.config = Config()
         self.plc_auth = self.config.get_plc_auth()
@@ -95,6 +95,7 @@ class sfaImport:
 
         if not auth_record:
             auth_record = GeniRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=-1)
+            auth_record['authority'] = get_authority(auth_record['hrn'])
             trace("  inserting authority record for " + hrn)
             table.insert(auth_record)