@@ -107,10 +107,8 @@ def parse_configuration(self, configuration):
107
107
self ._itb_defaults ['probes' ]
108
108
109
109
# grab configuration information for various jobmanagers
110
- probes_iter = self .get_installed_probe_config_files ().keys ()
111
- for probe in probes_iter :
112
- if probe == 'htcondor-ce' :
113
- self ._probe_config ['htcondor-ce' ] = {}
110
+ if "htcondor-ce" in self .get_installed_probe_config_files_by_probe ():
111
+ self ._probe_config ['htcondor-ce' ] = {}
114
112
115
113
self .get_options (configuration ,
116
114
ignore_options = ['itb-jobmanager-gratia' ,
@@ -165,9 +163,8 @@ def configure(self, attributes):
165
163
return False
166
164
167
165
hostname = attributes ['OSG_HOSTNAME' ]
168
- probe_config_files = self .get_installed_probe_config_files ()
169
- probes_iter = probe_config_files .keys ()
170
- for probe in probes_iter :
166
+ probe_config_files_by_probe = self .get_installed_probe_config_files_by_probe ()
167
+ for probe in probe_config_files_by_probe :
171
168
if probe in self ._job_managers :
172
169
if probe not in self ._probe_config :
173
170
# Probe is installed but we don't have configuration for it
@@ -189,20 +186,20 @@ def configure(self, attributes):
189
186
190
187
self ._subscribe_probe_to_remote_host (
191
188
probe ,
192
- probe_config_files [probe ],
189
+ probe_config_files_by_probe [probe ],
193
190
remote_host = probe_host ,
194
191
local_resource = self .options ['resource' ].value ,
195
192
local_host = hostname
196
193
)
197
- if probe == ' htcondor-ce' :
198
- self ._configure_htcondor_ce_probe ()
194
+ if " htcondor-ce" in probe_config_files_by_probe :
195
+ self ._configure_htcondor_ce_probe ()
199
196
200
197
self .log ("GratiaConfiguration.configure completed" )
201
198
return True
202
199
203
200
# pylint: disable-msg=R0201
204
201
@staticmethod
205
- def get_installed_probe_config_files ():
202
+ def get_installed_probe_config_files_by_probe ():
206
203
"""Return a mapping of probe name -> ProbeConfig file.
207
204
Note that "pbs" and "lsf" have the same probe.
208
205
"""
0 commit comments