Re: [jenkins-ci PATCH] lcitool: Raise Error instead of Exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 11, 2019 at 06:48:11PM +0100, Andrea Bolognani wrote:
> This results in
> 
>   $ ./lcitool dockerfile dockerfile -x foo libvirt-debian-9 libvirt
>   FROM debian:9
>   ./lcitool: Unsupported architecture ppc64el
> 
> being printed on error, instead of the much nastier
> 
>   $ ./lcitool dockerfile dockerfile -x foo libvirt-debian-9 libvirt
>   FROM debian:9
>   Traceback (most recent call last):
>     File "./lcitool", line 704, in <module>
>       Application().run()
>     File "./lcitool", line 699, in run
>       args.func(args)
>     File "./lcitool", line 643, in _action_dockerfile
>       deb_arch = Util.native_arch_to_deb_arch(args.cross_arch)
>     File "./lcitool", line 126, in native_arch_to_deb_arch
>       raise Exception("Unsupported architecture {}".format(native_arch))
>   Exception: Unsupported architecture foo

I'm curious why the "Error" class exists at all ? It doesn't seem
to add anything that the normal "Exception" class can't do, and
leads to bugs like the one here.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux