From: Tony Mack Date: Tue, 19 May 2009 17:18:34 +0000 (+0000) Subject: modify how we define trusted root basedir X-Git-Tag: sfa-0.9-0@14641~384 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f82f41e8c14d665eef6dedc94dfef84054970e9d;p=sfa.git modify how we define trusted root basedir --- diff --git a/geni/util/trustedroot.py b/geni/util/trustedroot.py index e957655d..c7579078 100644 --- a/geni/util/trustedroot.py +++ b/geni/util/trustedroot.py @@ -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)