From ce5ab0fc524a1c2c48c4c39d6fc8aae23019207b Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sun, 19 Dec 2010 19:30:49 -0700 Subject: [PATCH] Use os.devnull, not /dev/null Signed-off-by: Chris Larson --- lib/bb/build.py | 2 +- lib/bb/runqueue.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bb/build.py b/lib/bb/build.py index e9189530245..4575ba3aab1 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -38,7 +38,7 @@ from bb import data, event, mkdirhier, utils bblogger = logging.getLogger('BitBake') logger = logging.getLogger('BitBake.Build') -NULL = open('/dev/null', 'r+') +NULL = open(os.devnull, 'r+') # When we execute a python function we'd like certain things diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 6119019454b..1bb626ce027 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1002,7 +1002,7 @@ class RunQueueExecute: # Make the child the process group leader os.setpgid(0, 0) # No stdin - newsi = os.open('/dev/null', os.O_RDWR) + newsi = os.open(os.devnull, os.O_RDWR) os.dup2(newsi, sys.stdin.fileno()) self.notify_task_started(task) -- 2.47.3