equal
deleted
inserted
replaced
295 # get a Configuration object |
295 # get a Configuration object |
296 assert section == 'system' |
296 assert section == 'system' |
297 _sconfig = SourceConfiguration( |
297 _sconfig = SourceConfiguration( |
298 self, options=SOURCE_TYPES['native'].options) |
298 self, options=SOURCE_TYPES['native'].options) |
299 for attr, val in sconfig.items(): |
299 for attr, val in sconfig.items(): |
300 _sconfig.set_option(attr, val) |
300 try: |
|
301 _sconfig.set_option(attr, val) |
|
302 except lgconfig.OptionError: |
|
303 # skip adapter, may be present on pre 3.10 instances |
|
304 if attr != 'adapter': |
|
305 self.error('skip unknown option %s in sources file') |
301 sconfig = _sconfig |
306 sconfig = _sconfig |
302 print >> stream, '[%s]' % section |
307 print >> stream, '[%s]' % section |
303 print >> stream, generate_source_config(sconfig) |
308 print >> stream, generate_source_config(sconfig) |
304 print >> stream |
309 print >> stream |
305 restrict_perms_to_user(sourcesfile) |
310 restrict_perms_to_user(sourcesfile) |