Show More
@@ -244,17 +244,14 b' class Config(dict):' | |||
|
244 | 244 | return type(self)(copy.deepcopy(list(self.items()))) |
|
245 | 245 | |
|
246 | 246 | def __getitem__(self, key): |
|
247 | if _is_section_key(key): | |
|
248 | try: | |
|
249 | return dict.__getitem__(self, key) | |
|
250 | except KeyError: | |
|
247 | try: | |
|
248 | return dict.__getitem__(self, key) | |
|
249 | except KeyError: | |
|
250 | if _is_section_key(key): | |
|
251 | 251 | c = Config() |
|
252 | 252 | dict.__setitem__(self, key, c) |
|
253 | 253 | return c |
|
254 | else: | |
|
255 | try: | |
|
256 | return dict.__getitem__(self, key) | |
|
257 | except KeyError: | |
|
254 | else: | |
|
258 | 255 | # undefined, create lazy value, used for container methods |
|
259 | 256 | v = LazyConfigValue() |
|
260 | 257 | dict.__setitem__(self, key, v) |
General Comments 0
You need to be logged in to leave comments.
Login now