You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan U S <ma...@collab.net> on 2006/04/13 07:11:57 UTC

[PATCH] Fix contribulyze.py


http://www.red-bean.com/svnproject/contribulyzer/ is outdated, because contribulyze.py errors out. This patch fixes that.

[[[
A trailing white-space in the suggested-by string in r19298
put an error check in contribulyze.py to work and hence exit the script.
This fix accomodates such stray whitespaces, at the start, and at the end,
by striping them off before processing.

* tools/dev/contribulyze.py
  (Contributor.parse): Strip off leading/trailing whitespace, if any,
  from the name parameter.
]]]

Re: [PATCH] Fix contribulyze.py

Posted by Max Bowsher <ma...@ukf.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Madan U S wrote:
> 
> http://www.red-bean.com/svnproject/contribulyzer/ is outdated, because
> contribulyze.py errors out. This patch fixes that.
> 
> [[[
> A trailing white-space in the suggested-by string in r19298
> put an error check in contribulyze.py to work and hence exit the script.
> This fix accomodates such stray whitespaces, at the start, and at the end,
> by striping them off before processing.
> 
> * tools/dev/contribulyze.py
>   (Contributor.parse): Strip off leading/trailing whitespace, if any,
>   from the name parameter.
> ]]]
> 
> 
> ------------------------------------------------------------------------
> 
> Index: tools/dev/contribulyze.py
> ===================================================================
> --- tools/dev/contribulyze.py	(revision 19340)
> +++ tools/dev/contribulyze.py	(working copy)
> @@ -241,6 +241,8 @@
>      username  = None
>      real_name = None
>      email     = None
> +    # Tolerate leading and trailing spaces
> +    name = name.strip()
>      name_components = name.split()
>      if len(name_components) == 1:
>        if name_components[0] != name:

Yeah, I just got around to looking at why red-bean's cron was sending me
emails saying 'ERROR: Python couldn't have done that, could it?' :-/

The above patch is a bit clumsy: it works around the buggy test a few
lines below by ensuring the bug is never triggered.  Instead, I have
fixed the bug directly. I'd commit, but svn.collab.net is offline :-(

Max.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFEPm5YfFNSmcDyxYARAmtTAJsFAFuhk0fBBqLth0/i8bmVIE3mhwCeLAML
9xWmu/qqzDoPrM8ITIrYuSU=
=5Ryv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org