Re: [viewvc-dev] [PATCH] mod_python configuration

"C. Michael Pilato" <[email protected]> Thu, 15 Sep 2011 10:31:29 -0400
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Organization CollabNet, Inc.
Message-ID <4E720C41.2080808__46458.9303861887$1316097104$gmane$org@collab.net>
On 09/15/2011 06:23 AM, Alon Bar-Lev wrote:
> Hello,
> 
> Correct me if I am wrong, but current configuration of web extensions
> requires rewiring the python code, and modify:
> ---
> LIBRARY_DIR = None
> CONF_PATHNAME = None
> ---

You're wrong.  Well, sorta.  :-)

The viewvc.load_config() function is responsible for loading the
configuration information, and it already consults the VIEWVC_CONF_PATHNAME
environment variable to override the hard-coded stuff.

That said, in reviewing your patch, it occurs to me that the code in
viewvc.load_config() probably shouldn't use os.environ() to check for that
variable, but (if a 'server' is provided') should use server.getenv()
instead.  That way, the appropriate environment-checking function for the
deployment type (mod_python, CGI, IIS, etc.) is used.

Would you be willing to explore this idea a bit to see if it makes sense?

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2839230

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk5yDEEACgkQokEGqRcG/W5B+QCfWRvEZWp9Hrpruk8ElTQvpRu9
WoEAniRS7XOho/qGmXvB7Oa9MNBvyE+M
=ID5P
-----END PGP SIGNATURE-----