From 104b3625b3777a1796deb774e6b2a1249f348a20 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Wed, 28 Mar 2018 00:30:33 -0500 Subject: [PATCH] buptest: don't depend on helpers.mkdirp Better to keep the test harness independent when the relevant code is this simple. Signed-off-by: Rob Browning Tested-by: Rob Browning --- buptest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buptest.py b/buptest.py index 5d4fe05..c80d1ef 100644 --- a/buptest.py +++ b/buptest.py @@ -6,7 +6,7 @@ from os.path import basename, dirname, realpath from pipes import quote from subprocess import PIPE, Popen, check_call from traceback import extract_stack -import subprocess, sys, tempfile +import errno, os, subprocess, sys, tempfile from wvtest import WVPASSEQ, wvfailure_count @@ -34,7 +34,11 @@ def no_lingering_errors(): # Assumes (of course) this file is at the top-level of the source tree _bup_tmp = realpath(dirname(__file__) + '/t/tmp') -helpers.mkdirp(_bup_tmp) +try: + os.makedirs(_bup_tmp) +except OSError as e: + if e.errno != errno.EEXIST: + raise @contextmanager -- 2.39.2