From: Chris Larson Date: Mon, 20 Dec 2010 02:30:49 +0000 (-0700) Subject: Use os.devnull, not /dev/null X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce5ab0fc524a1c2c48c4c39d6fc8aae23019207b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git Use os.devnull, not /dev/null Signed-off-by: Chris Larson --- 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)