summaryrefslogtreecommitdiffstats
path: root/deploy/reap.py
diff options
context:
space:
mode:
authorPeter Barabas <peter.barabas@ericsson.com>2015-12-08 13:05:57 +0100
committerPeter Barabas <peter.barabas@ericsson.com>2015-12-08 13:05:57 +0100
commitfaecd53622b233f72961ce626ef70788b8a12562 (patch)
treeb693dfa9b8f5cb07f004cb420a1f7c0aa9c5fd4e /deploy/reap.py
parent8b7b4f8bde98b05ee68dbed04fa2861bbaaebc22 (diff)
Refactor temporary directory creation
Use Python's tempfile instead of forking a shell for mktemp. Change-Id: Icba442ea08d4098d67fb51575da16e85d4363beb Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
Diffstat (limited to 'deploy/reap.py')
-rw-r--r--deploy/reap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/deploy/reap.py b/deploy/reap.py
index b7080cdae..51e7cb658 100644
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -13,6 +13,7 @@ import os
import yaml
import glob
import shutil
+import tempfile
from common import (
N,
@@ -282,7 +283,7 @@ class Reap(object):
def intro(self):
delete(self.dea_file)
delete(self.dha_file)
- self.temp_dir = exec_cmd('mktemp -d')
+ self.temp_dir = tempfile.mkdtemp()
date = time.strftime('%c')
self.write(self.dea_file,
DEA_1.format(date=date, comment=self.comment), False)