diff mbox series

[2/3] devtool: __init__: small cleanups

Message ID 20250916155144.3279173-2-chris.laplante@agilent.com
State New
Headers show
Series [1/3] devtool: __init__: cleanup imports, including a missing 'import errno' | expand

Commit Message

chris.laplante@agilent.com Sept. 16, 2025, 3:51 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

+ Remove unused exec_fakeroot method, which wouldn't
  work anyway since it doesn't pass kwargs correctly.

+ Fix a None comparison

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 scripts/lib/devtool/__init__.py | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 396e8025b7f..717a60c039f 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -66,7 +66,7 @@  def exec_watch(cmd, **options):
             sys.stdout.write(out)
             sys.stdout.flush()
             buf += out
-        elif out == '' and process.poll() != None:
+        elif out == '' and process.poll() is not None:
             break
 
     if process.returncode != 0:
@@ -74,13 +74,6 @@  def exec_watch(cmd, **options):
 
     return buf, None
 
-def exec_fakeroot(d, cmd, **kwargs):
-    """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions"""
-    # Grab the command and check it actually exists
-    fakerootcmd = d.getVar('FAKEROOTCMD')
-    fakerootenv = d.getVar('FAKEROOTENV')
-    exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, kwargs)
-
 def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs):
     if not os.path.exists(fakerootcmd):
         logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built')