summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-19 16:37:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-22 08:50:21 +0000
commit425afe2484707640ac71194885fdb263e95e9950 (patch)
treea6b7be8c80bfb560af8f303e7bd23b423ab371ef
parentb2c1e1fe4221862e0dbf5d08960f0d0228e47c72 (diff)
downloadopenembedded-core-contrib-425afe2484707640ac71194885fdb263e95e9950.tar.gz
openembedded-core-contrib-425afe2484707640ac71194885fdb263e95e9950.tar.bz2
openembedded-core-contrib-425afe2484707640ac71194885fdb263e95e9950.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/utils.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index bf440ec960..3de21fc030 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):