Re: [viewvc-dev] Possible 1.1 viewvc nightly build problem

"Michael Leib" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <BA314DB14D4946E089BCEB960C6E0AB5__45418.9659482383$1210626376$gmane$org@hmsml>
Sir...

You are a scholar and a gentleman.

Not only does the fix work perfectly with

Python 2.2.3 (#1, Feb  6 2006, 10:44:13)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-54)] on linux2

(aka RH ES 3.0)

But I also see authorizer = svnauthz working as well (of course, I had to
set authzfile in the config which I almost missed :<)

Anyways, thanks so much and I highly suggest that the fix go into the 
devline
for 1.1 as it just saved me a ton o' grief.

Thanks again (so much!!),

Michael

----- Original Message ----- 
From: "C. Michael Pilato" <[email protected]>
To: "Michael Leib" <[email protected]>
Cc: <[email protected]>
Sent: Monday, May 12, 2008 1:30 PM
Subject: Re: [viewvc-dev] Possible 1.1 viewvc nightly build problem


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



--------------------------------------------------------------------------------


>* 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
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.