You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Roßberg <da...@gmail.com> on 2021/02/09 08:58:10 UTC
[PATCH] Python 3 compatibility: Raise statement update
Python 3 compatibility:
Update a raise statement probably missed in revision 873411 changes.
* tools/hook-scripts/svnperms.py
(Permission.parse_groups): Use 'raise exception("string")' instead of
'raise exception, "string"'.
Tested with FreeBSD 12.2 ports version. Without this change, the script
crashes with the default Python version.
Regards,
Daniel
Re: [PATCH] Python 3 compatibility: Raise statement update
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Feb 09, 2021 at 09:58:10AM +0100, Daniel Roßberg wrote:
> Python 3 compatibility:
> Update a raise statement probably missed in revision 873411 changes.
>
> * tools/hook-scripts/svnperms.py
> (Permission.parse_groups): Use 'raise exception("string")' instead of
> 'raise exception, "string"'.
>
> Tested with FreeBSD 12.2 ports version. Without this change, the script
> crashes with the default Python version.
>
> Regards,
> Daniel
> [[[
> Python 3 compatibility:
> Update a raise statement probably missed in revision 873411 changes.
>
> * tools/hook-scripts/svnperms.py
> (Permission.parse_groups): Use 'raise exception("string")' instead of
> 'raise exception, "string"'.
> ]]]
>
> Index: tools/hook-scripts/svnperms.py
> ===================================================================
> --- tools/hook-scripts/svnperms.py (Revision 1886351)
> +++ tools/hook-scripts/svnperms.py (Arbeitskopie)
> @@ -137,7 +137,8 @@ class Permission:
> try:
> groupusers.extend(self._group[token[1:]])
> except KeyError:
> - raise Error, "group '%s' not found" % token[1:]
> + raise Error("group '%s' not found" % \
> + token[1:])
> else:
> groupusers.append(token)
> self._group[option] = groupusers
Committed in https://svn.apache.org/r1886358
Thanks!
Regards,
Stefan