[libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

Erik Skultety eskultet at redhat.com
Thu Mar 18 08:12:28 UTC 2021


...

> Another thing I'm not a fan of is having the message start at column
> zero instead of being aligned along with the rest of the code...
> textwrap.dedent() could help here, although it'd be a little annoying
> to use because we want the image details to be indented and we can't
> know the correct indent in advance, so we'd have to do a two-step
> process along the lines of
> 
>   msg = textwrap.dedent(f"""
>       The following images are stale and can be purged from the registry:
> 
>       STALE_DETAILS
> 
>       ...
>   """)
>   print(msg.replace("STALE_DETAILS", stale_details))
> 
> A bit more cumbersome, but still preferable when it comes to
> readability IMHO.


So, I figured it would be more convenient to send a new revision rather than
continue the discussion here, so basically apart from ^this last request for
using textwrap.dedent I incorporated all your comments and we can discuss the
text wrapping further in there.

[v3] https://listman.redhat.com/archives/libvir-list/2021-March/msg00892.html

Regards,
Erik




More information about the libvir-list mailing list