diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-19 16:37:44 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-22 12:36:40 +0000 |
| commit | d77a135e18365369f7823088fa46df680b3a201e (patch) | |
| tree | bf20e3c637c48b4b85fdca073c96c19d70682587 /meta/lib/oe/utils.py | |
| parent | 554a16fd101d1ab5ac54f5897445e42a94e54ab9 (diff) | |
| download | poky-d77a135e18365369f7823088fa46df680b3a201e.tar.gz | |
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>
Diffstat (limited to 'meta/lib/oe/utils.py')
| -rw-r--r-- | 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 bf440ec960..3de21fc030 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
| @@ -1,9 +1,4 @@ | |||
| 1 | try: | 1 | import subprocess |
| 2 | # Python 2 | ||
| 3 | import commands as cmdstatus | ||
| 4 | except ImportError: | ||
| 5 | # Python 3 | ||
| 6 | import subprocess as cmdstatus | ||
| 7 | 2 | ||
| 8 | def read_file(filename): | 3 | def read_file(filename): |
| 9 | try: | 4 | try: |
| @@ -144,7 +139,7 @@ def packages_filter_out_system(d): | |||
| 144 | return pkgs | 139 | return pkgs |
| 145 | 140 | ||
| 146 | def getstatusoutput(cmd): | 141 | def getstatusoutput(cmd): |
| 147 | return cmdstatus.getstatusoutput(cmd) | 142 | return subprocess.getstatusoutput(cmd) |
| 148 | 143 | ||
| 149 | 144 | ||
| 150 | def trim_version(version, num_parts=2): | 145 | def trim_version(version, num_parts=2): |
