[3.10 migration] must skip None values
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 19 Oct 2010 13:16:20 +0200
changeset 6546 31586c7b63f6
parent 6545 5cea387a5667
child 6547 6be127941760
[3.10 migration] must skip None values
misc/migration/3.10.0_Any.py
--- a/misc/migration/3.10.0_Any.py	Tue Oct 19 13:14:48 2010 +0200
+++ b/misc/migration/3.10.0_Any.py	Tue Oct 19 13:16:20 2010 +0200
@@ -25,7 +25,7 @@
         continue
     repo.sources_by_uri.pop(uri)
     config = u'\n'.join('%s=%s' % (key, value) for key, value in cfg.items()
-                        if key != 'adapter')
+                        if key != 'adapter' and value is not None)
     create_entity('CWSource', name=unicode(uri), type=unicode(cfg['adapter']),
                   config=config)
 commit()