Re: [viewvc-dev] Possible 1.1 viewvc nightly build problem
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <4828A8F2.7060804__13951.0280489505$1210624304$gmane$org@collab.net> |
Michael, how fares the attached patch in remedying the problem? If well,
I'll go ahead and commit up (and maybe make 2.2 or 2.0 the minimum required
version).
Michael Leib wrote:
> Thanks for the response....I'm on RedHat ES3 which maxes out python at a
> level
> before your suggested cutoff of 2.3. So, in order to verify that is the
> problem (sounds
> like it is) I need to get the source and build my own. However, I'm
> having ./configure
> issues with it adding in zlib to the module...which, of course, is not
> your problem {grins}.
>
> I wish there was a build all option but, alas, there doesn't appear to
> be one.
>
> I can verify, for sure, that python 2.2.x doesn't work with your 1.1
> release.
>
> Michael
>
> ----- Original Message ----- From: "C. Michael Pilato"
> <[email protected]>
> To: "Michael Leib" <[email protected]>
> Cc: <[email protected]>
> Sent: Monday, May 12, 2008 11:12 AM
> Subject: Re: [viewvc-dev] Possible 1.1 viewvc nightly build problem
>
>
--
C. Michael Pilato <[email protected]>
CollabNet <> www.collab.net <> Distributed Development On Demand
cp-items-fix.patch.txt
(text/plain, 1.5 KB)
* lib/config.py
(Config._get_parser_items): New.
(Config.get_authorizer_params): Use _get_parser_items() instead of
the parser's items() function directly.
Index: lib/config.py
===================================================================
--- lib/config.py (revision 1880)
+++ lib/config.py (working copy)
@@ -162,6 +162,16 @@
return
self._process_root_options(self.parser, rootname)
+ def _get_parser_items(self, parser, section):
+ """Basically implement ConfigParser.items() for pre-Python-2.3 versions."""
+ try:
+ return self.parser.items(section)
+ except AttributeError:
+ d = {}
+ for option in parser.options(section):
+ d[option] = parser.get(section, option)
+ return d.items()
+
def get_authorizer_params(self, authorizer, rootname=None):
if not self.conf_path:
return {}
@@ -170,13 +180,13 @@
authz_section = 'authz-%s' % (authorizer)
for section in self.parser.sections():
if section == authz_section:
- for key, value in self.parser.items(section):
+ for key, value in self._get_parser_items(self.parser, section):
params[key] = value
if rootname:
root_authz_section = 'root-%s/authz-%s' % (rootname, authorizer)
for section in self.parser.sections():
if section == root_authz_section:
- for key, value in self.parser.items(section):
+ for key, value in self._get_parser_items(self.parser, section):
params[key] = value
return params
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIKKjyokEGqRcG/W4RAvEpAJwJfWvH5ke+zJ5JXDbZdNyfekcQPACfU9QF vjrY7ugcertgMFC2d/Etaa0= =yI4S -----END PGP SIGNATURE-----