From a517fa496c7a947b0d943fdf90a70b9d6eb312a8 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 2 May 2023 11:29:10 +0200 Subject: [PATCH] Fix test incompatibility with python-3.7+ platform.linux_distribution was removed in python-3.7. Related: #2175198 --- tests/functions_test/dmpd_library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functions_test/dmpd_library.py b/tests/functions_test/dmpd_library.py index 6578420..a761fe5 100755 --- a/tests/functions_test/dmpd_library.py +++ b/tests/functions_test/dmpd_library.py @@ -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():