mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-09 21:59:58 +08:00
Use mkdtemp instead of TemporaryDirectory
because the TemporaryDirectory is python3 only
This commit is contained in:
committed by
Nils Philippsen
parent
3ba33f4e53
commit
2c90806aa7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user