test/common_util.py: fix a bug in NonASCIIPathMixin that would cause spurious log entries on Windows.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
This commit is contained in:
parent
73d5a059bd
commit
884685278b
|
@ -45,8 +45,11 @@ class NonASCIIPathMixin:
|
|||
try:
|
||||
fileutil.rm_dir(dirpath)
|
||||
finally:
|
||||
log.err("We were unable to delete a non-ASCII directory %r created by the test. "
|
||||
if os.path.exists(dirpath):
|
||||
msg = ("We were unable to delete a non-ASCII directory %r created by the test. "
|
||||
"This is liable to cause failures on future builds." % (dirpath,))
|
||||
print msg
|
||||
log.err(msg)
|
||||
self.addCleanup(_cleanup)
|
||||
os.mkdir(dirpath)
|
||||
|
||||
|
|
Loading…
Reference in New Issue