Contents of /trunk/viewvc/patches/viewvc-1.1.3-config.patch
Parent Directory | Revision Log
Revision 1009 -
(show annotations)
(download)
Sun Mar 7 18:51:29 2010 UTC (14 years, 6 months ago) by niro
File size: 1266 byte(s)
Sun Mar 7 18:51:29 2010 UTC (14 years, 6 months ago) by niro
File size: 1266 byte(s)
patches for viewvc
1 | --- branches/1.1.x/lib/config.py 2010-01-07 07:56:29-0800 2316 |
2 | +++ branches/1.1.x/lib/config.py 2010-01-07 08:08:31-0800 2317 |
3 | @@ -274,9 +274,7 @@ |
4 | """Overlay per-root options for ROOTNAME atop the existing option |
5 | set. This is a destructive change to the configuration.""" |
6 | |
7 | - # We can only deal with this happening once! |
8 | - assert(self.root_options_overlayed == 0) |
9 | - self.root_options_overlayed = 1 |
10 | + did_overlay = 0 |
11 | |
12 | if not self.conf_path: |
13 | return |
14 | @@ -285,7 +283,17 @@ |
15 | base_section = self._is_allowed_override(self.parser, 'root', |
16 | rootname, section) |
17 | if base_section: |
18 | + # We can currently only deal with root overlays happening |
19 | + # once, so check that we've not yet done any overlaying of |
20 | + # per-root options. |
21 | + assert(self.root_options_overlayed == 0) |
22 | self._process_section(self.parser, section, base_section) |
23 | + did_overlay = 1 |
24 | + |
25 | + # If we actually did any overlaying, remember this fact so we |
26 | + # don't do it again later. |
27 | + if did_overlay: |
28 | + self.root_options_overlayed = 1 |
29 | |
30 | def _get_parser_items(self, parser, section): |
31 | """Basically implement ConfigParser.items() for pre-Python-2.3 versions.""" |