toolsutils.py
changeset 8697 574bb05e40a4
parent 8695 358d8bed9626
child 9740 c0239d8ae742
child 9928 0d831b40fa48
--- a/toolsutils.py	Thu Feb 14 16:01:24 2013 +0100
+++ b/toolsutils.py	Thu Feb 14 16:45:07 2013 +0100
@@ -176,7 +176,7 @@
                 if option[0] == '[':
                     # start a section
                     section = option[1:-1]
-                    assert not config.has_key(section), \
+                    assert section not in config, \
                            'Section %s is defined more than once' % section
                     config[section] = current = {}
                     continue