mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-06 05:20:09 +03:00
Don't delete the tempdir if it's passed in from the runner
This commit is contained in:
parent
7ecda007e0
commit
955bfd47de
|
@ -22,8 +22,10 @@ _target = None
|
||||||
_tempfiles = []
|
_tempfiles = []
|
||||||
if 'pillow-tests' in sys.argv[-1] and os.path.exists(sys.argv[-1]):
|
if 'pillow-tests' in sys.argv[-1] and os.path.exists(sys.argv[-1]):
|
||||||
_temproot = sys.argv[-1]
|
_temproot = sys.argv[-1]
|
||||||
|
_rmtempdir = False
|
||||||
else:
|
else:
|
||||||
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
||||||
|
_rmtempdir = True
|
||||||
_logfile = None
|
_logfile = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,6 +322,7 @@ def _setup():
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass # report?
|
pass # report?
|
||||||
|
if _rmtempdir:
|
||||||
try:
|
try:
|
||||||
os.rmdir(_temproot)
|
os.rmdir(_temproot)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user