[Zope3-dev] small patch

Steve Alexander steve@cat-box.net
Mon, 20 Jan 2003 11:22:53 +0200


sean.bowman@acm.org wrote:
> Hello,
> 
> I noticed there's a misspelling in zopepublication.py; here's a patch

Thanks. Have you considered getting commit access to the CVS repository?

   http://dev.zope.org/CVS/ContributorIntroduction


> Index: zopepublication.py
> ===================================================================
> RCS file:
> /cvs-repository/Zope3/src/zope/app/publication/zopepublication.py,v
> retrieving revision 1.7
> diff -u -r1.7 zopepublication.py
> --- zopepublication.py  2 Jan 2003 15:47:22 -0000       1.7
> +++ zopepublication.py  20 Jan 2003 03:25:56 -0000
> @@ -218,7 +218,7 @@
> 
>              # Convert ConflictErrors to Retry exceptions.
>              if retry_allowed and isinstance(exc_info[1], ConflictError):
> -                logger.getLogger('ZopePublication').warn(
> +                logging.getLogger('ZopePublication').warn(
>                      'Competing writes/reads at %s',
>                      request.get('PATH_INFO', '???'),
>                      exc_info=True)

Whoever checks this in, note that this code path is obviously not being 
exercised by the unit tests. At the least, it should have an XXX comment 
saying "this code path needs a unit test". At best, whoever checks in a 
fix will extend the existing unit tests to catch this error.

--
Steve Alexander