[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-dev
Subject:    Re: [PATCH] Python 3 compatibility: Raise statement update
From:       Stefan Sperling <stsp () elego ! de>
Date:       2021-02-09 12:00:05
Message-ID: YCJ5RVpwJOLI13dc () byrne ! stsp ! name
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic