Fix test incompatibility with python-3.7+
platform.linux_distribution was removed in python-3.7. Related: #2175198
This commit is contained in:
parent
5c9a2d488e
commit
a517fa496c
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user