[elbe-devel] [PATCH v2 1/1] Remove distro informations

Olivier Dion dion at linutronix.de
Thu Feb 6 00:15:06 CET 2020


platform.linux_distribution is deprecated since 3.5 and removed in
3.8, see
<https://docs.python.org/2/library/platform.html#platform.linux_distribution>,
thus removing its usage.

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbe                | 4 ++--
 elbepack/version.py | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/elbe b/elbe
index 9c65f9be3..834065235 100755
--- a/elbe
+++ b/elbe
@@ -14,7 +14,7 @@ import os
 import sys
 
 import elbepack.commands
-from elbepack.version import elbe_version, running_os
+from elbepack.version import elbe_version
 from elbepack.directories import init_directories, get_cmdlist
 
 
@@ -37,7 +37,7 @@ if (len(sys.argv) < 2):
     sys.exit(20)
 
 if sys.argv[1] == "--version":
-    print("elbe v %s %s %s" % (elbe_version, running_os[0], running_os[1]))
+    print("elbe v %s" % (elbe_version))
     sys.exit(0)
 
 cmd_list = get_cmdlist()
diff --git a/elbepack/version.py b/elbepack/version.py
index 0dfe7cddb..bd595dbca 100644
--- a/elbepack/version.py
+++ b/elbepack/version.py
@@ -4,12 +4,9 @@
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
-from platform import linux_distribution
-
 from elbepack.directories import pack_dir
 
 elbe_version = "12.1"
-running_os = linux_distribution()
 
 elbe_initvm_packagelist = ['python-elbe-buildenv',
                            'elbe-soap',
-- 
2.25.0




More information about the elbe-devel mailing list