[c-c reset-admin-pwd] don't crash on unknown option, and silently ignore 'adapter' which may be present in pre 3.10 sources file
--- a/server/serverconfig.py Wed Nov 03 10:12:16 2010 +0100
+++ b/server/serverconfig.py Thu Nov 04 10:58:29 2010 +0100
@@ -297,7 +297,12 @@
_sconfig = SourceConfiguration(
self, options=SOURCE_TYPES['native'].options)
for attr, val in sconfig.items():
- _sconfig.set_option(attr, val)
+ try:
+ _sconfig.set_option(attr, val)
+ except lgconfig.OptionError:
+ # skip adapter, may be present on pre 3.10 instances
+ if attr != 'adapter':
+ self.error('skip unknown option %s in sources file')
sconfig = _sconfig
print >> stream, '[%s]' % section
print >> stream, generate_source_config(sconfig)