Fix test incompatibility with python-3.7+
platform.linux_distribution was removed in python-3.7. Related: #2175198 (cherry picked from commit a517fa496c7a947b0d943fdf90a70b9d6eb312a8)
This commit is contained in:
parent
c950fe5f28
commit
b76b7df037
1 changed files with 3 additions and 3 deletions
|
|
@ -155,11 +155,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…
Add table
Add a link
Reference in a new issue