[libvirt PATCH 2/2] syntax-check: Ensure Python is called via env(1)

Andrea Bolognani abologna at redhat.com
Mon Feb 20 11:02:42 UTC 2023


On Mon, Feb 20, 2023 at 11:40:34AM +0100, Erik Skultety wrote:
> On Mon, Feb 20, 2023 at 11:21:46AM +0100, Andrea Bolognani wrote:
> > +sc_prohibit_python_without_env:
> > +	@prohibit='#!/usr/.*/py''thon' \
>
> Shouldn't this be just '#!/usr/.*/python' ?

Yes, but then the syntax-check rule would flag this very line :)

We could do the "exempt from syntax-check" dance, but that feels
unnecessarily complicated in this scenario. sc_copyright_usage
already uses a similar trick to prevent the regex to match itself.

-- 
Andrea Bolognani / Red Hat / Virtualization



More information about the libvir-list mailing list