summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Orccon <forccon@fluendo.com>2022-09-08 13:36:26 +0200
committerTim-Philipp Müller <tim@centricular.com>2022-09-21 00:35:20 +0100
commit714a389dd1e71831523f99e5e7a6d1af0b009063 (patch)
tree118730df96e1b3cd3c550d37c5fcde2eafb8ccf4
parent40d42b9fe415f6c8ec4c61a588d7b13baf9511c5 (diff)
distros: Fix CentOS allowance
Before, with Python 3.6, the pattern was: ('CentOS Linux', '7.9.2009', 'Core') But after installing Python 3.8 from centos-release-scl it is now ('CentOS Linux', '7', 'Core') Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/924>
-rw-r--r--cerbero/utils/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py
index cdaf2ec2..d5fa1436 100644
--- a/cerbero/utils/__init__.py
+++ b/cerbero/utils/__init__.py
@@ -307,11 +307,11 @@ Terminating.''', file=sys.stderr)
# str(int()) is for ensuring that the fedora version is
# actually a number
distro_version = 'fedora_' + str(int(d[1]))
- elif d[1].startswith('6.'):
+ elif d[1] == '6' or d[1].startswith('6.'):
distro_version = DistroVersion.REDHAT_6
- elif d[1].startswith('7.'):
+ elif d[1] == '7' or d[1].startswith('7.'):
distro_version = DistroVersion.REDHAT_7
- elif d[1].startswith('8.'):
+ elif d[1] == '8' or d[1].startswith('8.'):
distro_version = DistroVersion.REDHAT_8
elif d[0] == 'Amazon Linux' and d[1].startswith('2'):
distro_version = DistroVersion.AMAZON_LINUX_2