4 from geni.util.config import Config
6 class TrustedRootList():
7 def __init__(self, dir=None):
10 dir = config.config_path + os.sep + 'trusted_roots'
13 # create the directory to hold the files
15 os.makedirs(self.basedir)
16 # if the path already exists then pass
17 except OSError, (errno, strerr):
21 def add_gid(self, gid):
22 fn = os.path.join(self.basedir, gid.get_hrn() + ".gid")
29 file_list = os.listdir(self.basedir)
30 for gid_file in file_list:
31 fn = os.path.join(self.basedir, gid_file)
32 if os.path.isfile(fn):
33 gid = GID(filename = fn)