From fe8b338c8b33fb69f972aa986a15534efa0b3418 Mon Sep 17 00:00:00 2001 From: Trevor Cooper Date: Sat, 23 Sep 2023 20:27:46 -0700 Subject: [PATCH] don't fail on osinfo lookup for beta and lookahead --- createhdds.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/createhdds.py b/createhdds.py index e3b4275..0906970 100755 --- a/createhdds.py +++ b/createhdds.py @@ -250,6 +250,9 @@ class VirtInstallImage(object): # properly returns 1 on failure, but using workaround for old # bug where it didn't in case EPEL doesn't have 0.3.1 shortid = "rocky{0}".format(self.release) + # rocky has beta, rc# and lookahead releases that aren't in osinfo db + # replace text suffix in those with unknown. + shortid = "{0}-unknown".format(shortid.split('-')[0]) args = ["osinfo-query", "os", "short-id={0}".format(shortid)] process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) out = process.communicate()[0].decode()