[server] fix error messages in write_sources_file()
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Fri, 24 May 2013 15:10:50 +0200
changeset 8988 6cd912702239
parent 8986 f094b72d3a6c
child 8989 8742f4bf029f
[server] fix error messages in write_sources_file()
server/serverconfig.py
--- a/server/serverconfig.py	Fri May 03 17:26:23 2013 +0200
+++ b/server/serverconfig.py	Fri May 24 15:10:50 2013 +0200
@@ -333,7 +333,7 @@
             sconfig = sourcescfg[section]
             if isinstance(sconfig, dict):
                 # get a Configuration object
-                assert section == 'system'
+                assert section == 'system', '%r is not system' % section
                 _sconfig = SourceConfiguration(
                     self, options=SOURCE_TYPES['native'].options)
                 for attr, val in sconfig.items():
@@ -342,7 +342,7 @@
                     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')
+                            self.error('skip unknown option %s in sources file' % attr)
                 sconfig = _sconfig
             stream.write('[%s]\n%s\n' % (section, generate_source_config(sconfig)))
         restrict_perms_to_user(sourcesfile)