6 from sfa.trust.gid import *
7 from sfa.util.config import Config
10 def __init__(self, dir=None):
13 dir = config.config_path + os.sep + 'trusted_roots'
16 # create the directory to hold the files
18 os.makedirs(self.basedir)
19 # if the path already exists then pass
20 except OSError, (errno, strerr):
24 def add_gid(self, gid):
25 fn = os.path.join(self.basedir, gid.get_hrn() + ".gid")
32 file_list = os.listdir(self.basedir)
33 for gid_file in file_list:
34 fn = os.path.join(self.basedir, gid_file)
35 if os.path.isfile(fn):
36 gid = GID(filename = fn)