Changeset f005e44 for fedd


Ignore:
Timestamp:
Dec 4, 2008 10:23:03 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
02786fc
Parents:
c3d5d53
Message:

More cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    rc3d5d53 rf005e44  
    149149        self.thread_pool = experiment_control_local.thread_pool
    150150
    151         self.cert_file = None
    152         self.cert_pwd = None
    153         self.trusted_certs = None
    154 
    155         # Walk through the various relevant certificat specifying config
    156         # attributes until the local certificate attributes can be resolved.
    157         # The walk is from most specific to most general specification.
    158         for s in ("experiment_control", "globals"):
    159             if config.has_section(s):
    160                 if config.has_option(s, "cert_file"):
    161                     if not self.cert_file:
    162                         self.cert_file = config.get(s, "cert_file")
    163                         self.cert_pwd = config.get(s, "cert_pwd")
    164 
    165                 if config.has_option(s, "trusted_certs"):
    166                     if not self.trusted_certs:
    167                         self.trusted_certs = config.get(s, "trusted_certs")
    168 
     151        self.cert_file = config.get("experiment_control", "cert_file")
     152        if self.cert_file:
     153            self.cert_pwd = config.get("experiment_control", "cert_pwd")
     154        else:
     155            self.cert_file = config.get("experiment_control", "cert_file")
     156            self.cert_pwd = config.get("experiment_control", "cert_pwd")
     157
     158        self.trusted_certs = config.get("experiment_control", "trusted_certs") \
     159                or config.get("globals", "trusted_certs")
    169160
    170161        self.exp_stem = "fed-stem"
Note: See TracChangeset for help on using the changeset viewer.