]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
script/build-with-container: improve error handling for invalid distros
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 8 Oct 2025 20:41:36 +0000 (16:41 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 8 Oct 2025 23:31:35 +0000 (19:31 -0400)
commiteaffd777fd163dd8698c3ec776de67302fa9292a
treeac54cb2a052eae4f939a6d31eb03129fe7426997
parent9fb5174282973b52e321c4b00d6ece2a5121aef3
script/build-with-container: improve error handling for invalid distros

Instead of throwing a long obnoxious traceback at the user if the value
supplied to -d/--distro is invalid do something nicer. For example:
```
$ ./src/script/build-with-container.py -d trixy  -e build
usage: build-with-container.py [-h] [--help-build-steps]
build-with-container.py: error: argument --distro/-d: unknown distro: 'trixy' not in centos10, centos10stream, centos8, centos9, centos9stream, rocky9, rockylinux9, rocky10, rockylinux10, fedora41, fc41, fedora42, fc42, fedora43, fc43, ubuntu20.04, ubuntu-focal, focal, ubuntu22.04, ubuntu-jammy, jammy, ubuntu24.04, ubuntu-noble, noble, debian12, debian-bookworm, bookworm, debian13, debian-trixie, trixie

```

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 72f3ad9549e84bdba7bdfd97d2ede3c55e02f103)
src/script/build-with-container.py