modify how we define trusted root basedir
authorTony Mack <tmack@cs.princeton.edu>
Tue, 19 May 2009 17:18:34 +0000 (17:18 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 19 May 2009 17:18:34 +0000 (17:18 +0000)
geni/util/trustedroot.py

index e957655..c757907 100644 (file)
@@ -1,11 +1,15 @@
 import os
 
 from gid import *
+from geni.util.config import Config
 
 class TrustedRootList():
-    def __init__(self, dir="./trusted_roots"):
-        self.basedir = dir
-
+    def __init__(self, dir=None):
+        if not dir:
+            config = Config()
+            self.basedir = config.path + os.sep + 'trusted_roots'
+        else:
+            self.basedir = dir
         # create the directory to hold the files
         try:
             os.makedirs(self.basedir)\r