-----BEGIN PGP SIGNED MESSAGE-----
Sylvain Viollon wrote:
> On Sat, 06 Feb 2010 02:14:07 -0500
> Tres Seaver <tsea...@palladion.com> wrote:
>> There was never any guarantee that Globals would be fully popluated
>> before the start of product initialization: third-party code needs to
>> defer checking that flag at "import" time (which is the point of the
>> pattern Hanno outlines).
>> An even better pattern would probably be to avoid the Globals "dumping
>> ground" altogether and use the configuration object directly:
>> from App.config import getConfiguration
>> config = getConfiguration()
>> if config.debug_mode:
> As matter of fact I tried that. And it always returned False
> (that's why I posted that mail at first). I have to review my setup,
> to see if there is something wrong, before I can continue to argue.
> I am using buildout and plone.recipe.zope2instance.
That sounds as though you grabbed the configuration "early" (before
startup has loaded it from the config file / command line options). You
*can't* to this at module scope, because your module may be imported
before the initialization has been done.
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -