Richard W.M. Jones
2018-Aug-08 15:17 UTC
Re: [Libguestfs] [PATCH nbdkit] python: Try harder to print the full traceback on error.
On Wed, Aug 08, 2018 at 06:08:45PM +0300, Nir Soffer wrote:> Can we simplify this these 2 calls? > > nbdkit_error ("%s: %s: error", script, callback); > PyErr_PrintEx (0);No, we want to ensure errors go through the nbdkit_error function so that we can in future implement syslog logging.> In this case we don't to fallback to the simple error print.Do you mean in the case of using PyErr_PrintEx or more generally falling back is a problem? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Nir Soffer
2018-Aug-08 15:20 UTC
Re: [Libguestfs] [PATCH nbdkit] python: Try harder to print the full traceback on error.
On Wed, Aug 8, 2018 at 6:17 PM Richard W.M. Jones <rjones@redhat.com> wrote:> On Wed, Aug 08, 2018 at 06:08:45PM +0300, Nir Soffer wrote: > > Can we simplify this these 2 calls? > > > > nbdkit_error ("%s: %s: error", script, callback); > > PyErr_PrintEx (0); > > No, we want to ensure errors go through the nbdkit_error function so > that we can in future implement syslog logging. > > > In this case we don't to fallback to the simple error print. > > Do you mean in the case of using PyErr_PrintEx or more generally > falling back is a problem? >Just for PyErr_PrintEx, since it cannot fail.> > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-builder quickly builds VMs from scratch > http://libguestfs.org/virt-builder.1.html >
Richard W.M. Jones
2018-Aug-08 15:26 UTC
Re: [Libguestfs] [PATCH nbdkit] python: Try harder to print the full traceback on error.
On Wed, Aug 08, 2018 at 06:20:16PM +0300, Nir Soffer wrote:> On Wed, Aug 8, 2018 at 6:17 PM Richard W.M. Jones <rjones@redhat.com> wrote: > > > On Wed, Aug 08, 2018 at 06:08:45PM +0300, Nir Soffer wrote: > > > Can we simplify this these 2 calls? > > > > > > nbdkit_error ("%s: %s: error", script, callback); > > > PyErr_PrintEx (0); > > > > No, we want to ensure errors go through the nbdkit_error function so > > that we can in future implement syslog logging. > > > > > In this case we don't to fallback to the simple error print. > > > > Do you mean in the case of using PyErr_PrintEx or more generally > > falling back is a problem? > > > > Just for PyErr_PrintEx, since it cannot fail.Got it, thanks. Thanks for the review, I have pushed it as is with a few cosmetic changes. I will file a bug for the backport. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard W.M. Jones
2018-Aug-08 15:33 UTC
Re: [Libguestfs] [PATCH nbdkit] python: Try harder to print the full traceback on error.
https://bugzilla.redhat.com/show_bug.cgi?id=1613946 -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Maybe Matching Threads
- Re: [PATCH nbdkit] python: Try harder to print the full traceback on error.
- Re: [PATCH nbdkit] python: Try harder to print the full traceback on error.
- [PATCH nbdkit] python: Try harder to print the full traceback on error.
- [PATCH nbdkit] python: Allow extents to return any iterable (which includes lists).
- Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.