[Zope] Re: Give 'Extensions' a configurable directory in zope.conf

Rodrigo Senra rodsenra at gpr.com.br
Thu Nov 18 14:25:11 EST 2004


 [ Tres Seaver ]:
 ----------------
 | "Patches accepted" is the right response for the feature request here.

 In this case I'm on it.
 
 Since it is my first patch to Zope, some advice is more than welcomed.


 The changes so far relative to svn truck are:
  
   * /lib/python/Products/ExternalMethod/help/ExternalMethod.py

     - docstring comment


   * /lib/python/Products/ExternalMethod/ExternalMethod.py

     - little typos (not related, but since I was there <wink>)
     - docstring comment


   * /etc/zope.conf

     - new directive 'extensions', comments and example


   * /lib/python/Zope/Startup/zopeschema.xml

     - new directive 'extensions' (type key)

 
   * /lib/python/App/Extensions.py

     - in getPath() check if directive 'extensions' is overriden in zope.conf,
       and use it instead. 

 The relevant code added to getPath() is depicted below.

<code>
    if (prefix=="Extensions") and (cfg.extensions is not None):
        r=_getPath(cfg.extensions, '', name, suffixes)
        if r is not None: return r
</code>

 
 However, I did not understood the purpose of the construction
 "if r is not None: return r".

 That was the last statement in getPath(). If r==None then getPath()
 wouldn't return None all the same ?

 I believe this is the last bit of doubt before submitting the patch.

 BTW, maybe I should have posted this to Zope-Dev instead ?

 best regards,
 Senra




More information about the Zope mailing list