1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

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>
This commit is contained in:
Michael Estner
2025-02-17 16:29:53 +01:00
committed by Richard Purdie
parent ebdbd105ef
commit 8f69906d5e
+3 -7
View File
@@ -11,11 +11,8 @@ import re, fcntl, os, string, stat, shutil, time
import sys import sys
import errno import errno
import logging import logging
import bb
import bb.msg
import locale import locale
import multiprocessing import multiprocessing
import fcntl
import importlib import importlib
import importlib.machinery import importlib.machinery
import importlib.util import importlib.util
@@ -24,7 +21,6 @@ import subprocess
import glob import glob
import fnmatch import fnmatch
import traceback import traceback
import errno
import signal import signal
import collections import collections
import copy import copy
@@ -36,6 +32,8 @@ import tempfile
from subprocess import getstatusoutput from subprocess import getstatusoutput
from contextlib import contextmanager from contextlib import contextmanager
from ctypes import cdll from ctypes import cdll
import bb
import bb.msg
logger = logging.getLogger("BitBake.Util") logger = logging.getLogger("BitBake.Util")
python_extensions = importlib.machinery.all_suffixes() python_extensions = importlib.machinery.all_suffixes()
@@ -1457,8 +1455,6 @@ def edit_bblayers_conf(bblayers_conf, add, remove, edit_cb=None):
but weren't (because they weren't in the list) but weren't (because they weren't in the list)
""" """
import fnmatch
def remove_trailing_sep(pth): def remove_trailing_sep(pth):
if pth and pth[-1] == os.sep: if pth and pth[-1] == os.sep:
pth = pth[:-1] pth = pth[:-1]
@@ -1649,7 +1645,7 @@ def ioprio_set(who, cls, value):
bb.warn("Unable to set IO Prio for arch %s" % _unamearch) bb.warn("Unable to set IO Prio for arch %s" % _unamearch)
def set_process_name(name): def set_process_name(name):
from ctypes import cdll, byref, create_string_buffer from ctypes import byref, create_string_buffer
# This is nice to have for debugging, not essential # This is nice to have for debugging, not essential
try: try:
libc = cdll.LoadLibrary('libc.so.6') libc = cdll.LoadLibrary('libc.so.6')