@@ -258,21 +258,13 @@ def load_special(self, cnf, typ):
258
258
self .setattr (typ , arg , _val )
259
259
260
260
self .context = typ
261
- self .load_complex (cnf , typ )
262
261
self .context = self .def_context
263
262
264
- def load_complex (self , cnf , typ = "" ):
265
- try :
266
- self .setattr (typ , "policy" , Policy (cnf ["policy" ], config = self ))
267
- except KeyError :
268
- pass
269
-
270
- # for srv, spec in cnf["service"].items():
271
- # try:
272
- # self.setattr(srv, "policy",
273
- # Policy(cnf["service"][srv]["policy"]))
274
- # except KeyError:
275
- # pass
263
+ def load_complex (self , cnf ):
264
+ acs = ac_factory (cnf .get ("attribute_map_dir" ))
265
+ if not acs :
266
+ raise ConfigurationError ("No attribute converters, something is wrong!!" )
267
+ self .setattr ("" , "attribute_converters" , acs )
276
268
277
269
def unicode_convert (self , item ):
278
270
try :
@@ -339,16 +331,6 @@ def load(self, cnf, metadata_construction=False):
339
331
if "extensions" in cnf :
340
332
self .do_extensions (cnf ["extensions" ])
341
333
342
- acs = ac_factory (cnf .get ("attribute_map_dir" ))
343
- if not acs :
344
- raise ConfigurationError ("No attribute converters, something is wrong!!" )
345
- self .setattr ("" , "attribute_converters" , acs )
346
-
347
- try :
348
- self .setattr ("" , "metadata" , self .load_metadata (cnf ["metadata" ]))
349
- except KeyError :
350
- pass
351
-
352
334
self .load_complex (cnf )
353
335
self .context = self .def_context
354
336
0 commit comments