[libvirt] [PATCH python 09/15] setup: Fix exception catching syntax

Doug Goldstein cardoe at gentoo.org
Tue Dec 3 16:49:11 UTC 2013


On Tue, Dec 3, 2013 at 10:36 AM, Daniel P. Berrange <berrange at redhat.com> wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> In Python3 you cannot use 'except Foo, e' you must use
> 'except Foo as e' instead, or just 'except Foo' if the
> variable isn't required.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  setup.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/setup.py b/setup.py
> index bf222f8..ecbce1f 100755
> --- a/setup.py
> +++ b/setup.py
> @@ -40,7 +40,7 @@ try:
>      spawn([pkgcfg,
>             "--atleast-version=%s" % MIN_LIBVIRT_LXC,
>           "libvirt"])
> -except DistutilsExecError,e:
> +except DistutilsExecError:
>      have_libvirt_lxc=False
>
>  def get_pkgconfig_data(args, mod, required=True):
> --
> 1.8.3.1


ACK.

-- 
Doug Goldstein




More information about the libvir-list mailing list