@@ -277,22 +277,25 @@ def _populate(self, parser, section, filename, priority=PRIO_DEFAULT):
277
277
if not value or value == 'None' :
278
278
value = None
279
279
280
- opt = self . _get_option ( name )
281
- if opt : # and not opt._is_runtimeonly():
282
- try :
283
- if value is not None :
284
- opt ._set ( value , priority )
285
- except dnf . exceptions . ConfigError as e :
286
- logger . debug ( _ ( 'Unknown configuration value: '
287
- '%s=%s in %s; %s' ), ucd ( name ),
288
- ucd ( value ), ucd ( filename ), e . raw_error )
289
- else :
290
- if name == 'arch' and hasattr ( self , name ):
291
- setattr ( self , name , value )
280
+ try :
281
+ self . _config . optBinds (). at ( name ). newString ( priority , value )
282
+ except RuntimeError :
283
+ opt = self . _get_option ( name )
284
+ if opt : # and not opt._is_runtimeonly():
285
+ try :
286
+ if value is not None :
287
+ opt . _set ( value , priority )
288
+ except dnf . exceptions . ConfigError as e :
289
+ logger . debug ( _ ( 'Unknown configuration value: '
290
+ '%s=%s in %s; %s' ), ucd ( name ),
291
+ ucd ( value ), ucd ( filename ), e . raw_error )
292
292
else :
293
- logger .debug (
294
- _ ('Unknown configuration option: %s = %s in %s' ),
295
- ucd (name ), ucd (value ), ucd (filename ))
293
+ if name == 'arch' and hasattr (self , name ):
294
+ setattr (self , name , value )
295
+ else :
296
+ logger .debug (
297
+ _ ('Unknown configuration option: %s = %s in %s' ),
298
+ ucd (name ), ucd (value ), ucd (filename ))
296
299
297
300
# def _config_items(self):
298
301
"""Yield (name, value) pairs for every option in the instance."""
0 commit comments