mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-06 23:31:29 +00:00
Replace a wrong usage of 'distro_info' by a simpler static list
Just for sharing a snippet, here would be the correct usage of `distro_info`: ```python import distro_info d = distro_info.UbuntuDistroInfo() x = d.get_all() x.index("xenial") < x.index("noble") ```
This commit is contained in:
parent
a0bf23fba0
commit
14bbcfe365
@ -38,7 +38,6 @@ from urllib.error import HTTPError
|
|||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
import apt_pkg
|
import apt_pkg
|
||||||
import distro_info
|
|
||||||
|
|
||||||
import britney2.hints
|
import britney2.hints
|
||||||
|
|
||||||
@ -849,7 +848,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
try:
|
try:
|
||||||
# Filter tests to main packages on riscv64 for Noble+
|
# Filter tests to main packages on riscv64 for Noble+
|
||||||
if arch == "riscv64":
|
if arch == "riscv64":
|
||||||
if self.options.series >= distro_info.UbuntuDistroInfo().codename("noble"):
|
if self.options.series not in ["focal", "jammy"]:
|
||||||
tests = [(src, version) for (src, version) in tests if sources_info[src].component == UbuntuComponent.MAIN]
|
tests = [(src, version) for (src, version) in tests if sources_info[src].component == UbuntuComponent.MAIN]
|
||||||
else:
|
else:
|
||||||
tests = []
|
tests = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user