diff options
author | JF Ding <jian-feng.ding@intel.com> | 2011-10-21 13:32:26 +0800 |
---|---|---|
committer | JF Ding <jian-feng.ding@intel.com> | 2011-10-21 13:32:26 +0800 |
commit | 38811063a471c3d36be31f437d86a34af038f083 (patch) | |
tree | 11006b6d127653ae1610ebffdfeb506d78dd5e26 | |
parent | 20ee81b73bf23eb85be58d92830a946e84ce2be5 (diff) | |
parent | f97b1c33e1fcf2798341896c519f82afa7d7eb9f (diff) | |
download | mic-38811063a471c3d36be31f437d86a34af038f083.tar.gz mic-38811063a471c3d36be31f437d86a34af038f083.tar.bz2 mic-38811063a471c3d36be31f437d86a34af038f083.zip |
Merge remote branch 'origin/master'
-rw-r--r-- | mic/utils/misc.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mic/utils/misc.py b/mic/utils/misc.py index b853c3f..cbf36ab 100644 --- a/mic/utils/misc.py +++ b/mic/utils/misc.py @@ -56,10 +56,9 @@ def save_ksconf_file(ksconf, release="latest", arch = "ia32", oldconf = None): kscont.replace("@ARCH@", arch) if kscont.find("/@BUILD_ID@/") != -1: kscont = kscont.replace("@BUILD_ID@", release) - ksconf = "/var/tmp/%s" % ksconf - fd = open(ksconf, "w") - fd.write(kscont) - fd.close() + fd, ksconf = tempfile.mkstemp(prefix=os.path.basename(ksconf)+"-", dir="/var/tmp/mic/") + os.write(fd, kscont) + os.close(fd) return ksconf |