]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
moveconfig: Drop check for old Python
authorSimon Glass <sjg@chromium.org>
Sat, 18 Dec 2021 21:54:32 +0000 (14:54 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 24 Jan 2022 22:36:29 +0000 (17:36 -0500)
Python 2 is not supported anymore and Python 3 has had subprocess.DEVNULL
since version 3.3 which was released in 2012. Drop the unnecessary check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
tools/moveconfig.py

index 521297f7d58d0e92059bbdb1916323d6e088a136..0b33f3190e3dbb2d87840c32a7917624d7ce6912 100755 (executable)
@@ -91,14 +91,6 @@ SIZES = {
 }
 
 ### helper functions ###
-def get_devnull():
-    """Get the file object of '/dev/null' device."""
-    try:
-        devnull = subprocess.DEVNULL # py3k
-    except AttributeError:
-        devnull = open(os.devnull, 'wb')
-    return devnull
-
 def check_top_directory():
     """Exit if we are not at the top of source directory."""
     for f in ('README', 'Licenses'):
@@ -1083,7 +1075,7 @@ class Slots:
         """
         self.args = args
         self.slots = []
-        devnull = get_devnull()
+        devnull = subprocess.DEVNULL
         make_cmd = get_make_cmd()
         for i in range(args.jobs):
             self.slots.append(Slot(toolchains, configs, args, progress,