[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Libvir] Proposal: Python bindings should turn NO_DOMAIN/NO_NETWORK errors in KeyError exceptions
- From: Daniel Veillard <veillard redhat com>
- To: "Richard W.M. Jones" <rjones redhat com>
- Cc: libvir-list <libvir-list redhat com>
- Subject: Re: [Libvir] Proposal: Python bindings should turn NO_DOMAIN/NO_NETWORK errors in KeyError exceptions
- Date: Wed, 4 Jul 2007 07:12:44 -0400
On Wed, Jul 04, 2007 at 10:44:29AM +0100, Richard W.M. Jones wrote:
> I propose that we should change the Python bindings so that when the
> virterror errors VIR_ERR_NO_DOMAIN and VIR_ERR_NO_NETWORK occur in the
> lookup* functions only, should cause KeyError to be raised.
>
> According to:
>
> http://docs.python.org/lib/module-exceptions.html
>
> "[KeyError is] raised when a mapping (dictionary) key is not found in
> the set of existing keys."
>
> I've already changed the OCaml bindings so that these errors get
> converted into Not_found exception, which is the "natural" exception for
> when something is looked up and not found.
I think this makes sense, I just wonder a bit about the impact on
existing client code,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]