mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user