diff options
author | Michael Estner <michaelestner@web.de> | 2025-02-17 16:29:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-18 23:07:07 +0000 |
commit | 8f69906d5ed64f2fa94ebe2f7215e5087bf1e6df (patch) | |
tree | a2a7f9749d93734273de1a17fc64499355b91ce4 /bitbake | |
parent | ebdbd105efb68bd4c68b5701927e51a3a676859a (diff) | |
download | poky-8f69906d5ed64f2fa94ebe2f7215e5087bf1e6df.tar.gz |
bitbake: utils: Clean up imports
* Remove double imports
* Re-roder the imports as mentioned by pylint
(Bitbake rev: 6de536bbaee8cf7664c5702a96a5ca18ad09fb9d)
Signed-off-by: Michael Estner <michaelestner@web.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/utils.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 135c71c007..3cb59d8078 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -11,11 +11,8 @@ import re, fcntl, os, string, stat, shutil, time | |||
11 | import sys | 11 | import sys |
12 | import errno | 12 | import errno |
13 | import logging | 13 | import logging |
14 | import bb | ||
15 | import bb.msg | ||
16 | import locale | 14 | import locale |
17 | import multiprocessing | 15 | import multiprocessing |
18 | import fcntl | ||
19 | import importlib | 16 | import importlib |
20 | import importlib.machinery | 17 | import importlib.machinery |
21 | import importlib.util | 18 | import importlib.util |
@@ -24,7 +21,6 @@ import subprocess | |||
24 | import glob | 21 | import glob |
25 | import fnmatch | 22 | import fnmatch |
26 | import traceback | 23 | import traceback |
27 | import errno | ||
28 | import signal | 24 | import signal |
29 | import collections | 25 | import collections |
30 | import copy | 26 | import copy |
@@ -36,6 +32,8 @@ import tempfile | |||
36 | from subprocess import getstatusoutput | 32 | from subprocess import getstatusoutput |
37 | from contextlib import contextmanager | 33 | from contextlib import contextmanager |
38 | from ctypes import cdll | 34 | from ctypes import cdll |
35 | import bb | ||
36 | import bb.msg | ||
39 | 37 | ||
40 | logger = logging.getLogger("BitBake.Util") | 38 | logger = logging.getLogger("BitBake.Util") |
41 | python_extensions = importlib.machinery.all_suffixes() | 39 | python_extensions = importlib.machinery.all_suffixes() |
@@ -1457,8 +1455,6 @@ def edit_bblayers_conf(bblayers_conf, add, remove, edit_cb=None): | |||
1457 | but weren't (because they weren't in the list) | 1455 | but weren't (because they weren't in the list) |
1458 | """ | 1456 | """ |
1459 | 1457 | ||
1460 | import fnmatch | ||
1461 | |||
1462 | def remove_trailing_sep(pth): | 1458 | def remove_trailing_sep(pth): |
1463 | if pth and pth[-1] == os.sep: | 1459 | if pth and pth[-1] == os.sep: |
1464 | pth = pth[:-1] | 1460 | pth = pth[:-1] |
@@ -1649,7 +1645,7 @@ def ioprio_set(who, cls, value): | |||
1649 | bb.warn("Unable to set IO Prio for arch %s" % _unamearch) | 1645 | bb.warn("Unable to set IO Prio for arch %s" % _unamearch) |
1650 | 1646 | ||
1651 | def set_process_name(name): | 1647 | def set_process_name(name): |
1652 | from ctypes import cdll, byref, create_string_buffer | 1648 | from ctypes import byref, create_string_buffer |
1653 | # This is nice to have for debugging, not essential | 1649 | # This is nice to have for debugging, not essential |
1654 | try: | 1650 | try: |
1655 | libc = cdll.LoadLibrary('libc.so.6') | 1651 | libc = cdll.LoadLibrary('libc.so.6') |