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>
This commit is contained in:
parent
554a16fd10
commit
d77a135e18
|
@ -1,9 +1,4 @@
|
||||||
try:
|
import subprocess
|
||||||
# Python 2
|
|
||||||
import commands as cmdstatus
|
|
||||||
except ImportError:
|
|
||||||
# Python 3
|
|
||||||
import subprocess as cmdstatus
|
|
||||||
|
|
||||||
def read_file(filename):
|
def read_file(filename):
|
||||||
try:
|
try:
|
||||||
|
@ -144,7 +139,7 @@ def packages_filter_out_system(d):
|
||||||
return pkgs
|
return pkgs
|
||||||
|
|
||||||
def getstatusoutput(cmd):
|
def getstatusoutput(cmd):
|
||||||
return cmdstatus.getstatusoutput(cmd)
|
return subprocess.getstatusoutput(cmd)
|
||||||
|
|
||||||
|
|
||||||
def trim_version(version, num_parts=2):
|
def trim_version(version, num_parts=2):
|
||||||
|
|
Loading…
Reference in New Issue