]> arthur.barton.de Git - bup.git/commitdiff
buptest: don't depend on helpers.mkdirp
authorRob Browning <rlb@defaultvalue.org>
Wed, 28 Mar 2018 05:30:33 +0000 (00:30 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 31 Mar 2018 22:25:50 +0000 (17:25 -0500)
Better to keep the test harness independent when the relevant code is
this simple.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
buptest.py

index 5d4fe05029643f9ba7049f479ed52e2b4f794039..c80d1ef70dc2f961328e377e4442c88643f2f320 100644 (file)
@@ -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