mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-05 04:50: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 = []
|
||||
if 'pillow-tests' in sys.argv[-1] and os.path.exists(sys.argv[-1]):
|
||||
_temproot = sys.argv[-1]
|
||||
_rmtempdir = False
|
||||
else:
|
||||
_temproot = tempfile.mkdtemp(prefix='pillow-tests')
|
||||
_rmtempdir = True
|
||||
_logfile = None
|
||||
|
||||
|
||||
|
@ -320,10 +322,11 @@ def _setup():
|
|||
os.remove(file)
|
||||
except OSError:
|
||||
pass # report?
|
||||
try:
|
||||
os.rmdir(_temproot)
|
||||
except OSError:
|
||||
pass
|
||||
if _rmtempdir:
|
||||
try:
|
||||
os.rmdir(_temproot)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
import atexit
|
||||
atexit.register(report)
|
||||
|
|
Loading…
Reference in New Issue
Block a user