aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-18 14:54:32 -0700
committerTom Rini <trini@konsulko.com>2022-01-24 17:36:29 -0500
commit478920dc586458e49cd4801654b31f5c8ea58569 (patch)
tree3a537af920a8bbaf3d639d229cac70fcf3f31f15 /tools
parentb2e83c63483f84bcee6eef2071fc8387a951d2b3 (diff)
downloadu-boot-478920dc586458e49cd4801654b31f5c8ea58569.zip
u-boot-478920dc586458e49cd4801654b31f5c8ea58569.tar.gz
u-boot-478920dc586458e49cd4801654b31f5c8ea58569.tar.bz2
moveconfig: Drop check for old Python
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/moveconfig.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 521297f..0b33f31 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -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,