Fix test incompatibility with python-3.7+

platform.linux_distribution was removed in python-3.7.

Related: #2175198
This commit is contained in:
Marian Csontos 2023-05-02 11:29:10 +02:00
parent 5c9a2d488e
commit a517fa496c

View File

@ -156,11 +156,11 @@ def dist_release():
"""
Find out the release number of Linux distribution.
"""
dist = platform.linux_distribution()
if not dist or dist[1] == "":
dist = platform.release()
if not dist:
_print("WARN: dist_release() - Could not determine dist release")
return None
return dist[1]
return dist
def dist_ver():