[gnome-continuous-yocto/gnomeostree-3.28-rocko: 3886/8267] lib/oe/utils: Drop python2 compatibility code
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 3886/8267] lib/oe/utils: Drop python2 compatibility code
- Date: Sun, 17 Dec 2017 01:15:44 +0000 (UTC)
commit d77a135e18365369f7823088fa46df680b3a201e
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Mon Dec 19 16:37:44 2016 +0000
lib/oe/utils: Drop python2 compatibility code
We've moved to python3, we don't need this compatibility code which just makes
the code less readable.
(From OE-Core rev: 425afe2484707640ac71194885fdb263e95e9950)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oe/utils.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index bf440ec..3de21fc 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -1,9 +1,4 @@
-try:
- # Python 2
- import commands as cmdstatus
-except ImportError:
- # Python 3
- import subprocess as cmdstatus
+import subprocess
def read_file(filename):
try:
@@ -144,7 +139,7 @@ def packages_filter_out_system(d):
return pkgs
def getstatusoutput(cmd):
- return cmdstatus.getstatusoutput(cmd)
+ return subprocess.getstatusoutput(cmd)
def trim_version(version, num_parts=2):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]