equal
deleted
inserted
replaced
174 except ValueError: |
174 except ValueError: |
175 option = line.strip().lower() |
175 option = line.strip().lower() |
176 if option[0] == '[': |
176 if option[0] == '[': |
177 # start a section |
177 # start a section |
178 section = option[1:-1] |
178 section = option[1:-1] |
179 assert not config.has_key(section), \ |
179 assert section not in config, \ |
180 'Section %s is defined more than once' % section |
180 'Section %s is defined more than once' % section |
181 config[section] = current = {} |
181 config[section] = current = {} |
182 continue |
182 continue |
183 sys.stderr.write('ignoring malformed line\n%r\n' % line) |
183 sys.stderr.write('ignoring malformed line\n%r\n' % line) |
184 continue |
184 continue |