Use mkdtemp instead of TemporaryDirectory

because the TemporaryDirectory is python3 only
This commit is contained in:
Jakub Kadlčík
2016-08-17 13:35:04 +02:00
committed by Nils Philippsen
parent 3ba33f4e53
commit 2c90806aa7

View File

@@ -167,9 +167,8 @@ class SCM(object):
return True if rc == 200 else False
else:
try:
td = tempfile.TemporaryDirectory()
self.checkout(td.name)
td.cleanup()
td = tempfile.mkdtemp()
self.checkout(td)
return True
except:
return False