From 9909fd87e54c1277338478eb62f0bb74da0dde5a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 8 Aug 2010 18:36:46 +0200 Subject: [PATCH] [molecule.specs.plugins] use molecule.utils.mkdtemp() --- molecule/specs/plugins/remaster_plugin.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/molecule/specs/plugins/remaster_plugin.py b/molecule/specs/plugins/remaster_plugin.py index ae72b82..1dac152 100644 --- a/molecule/specs/plugins/remaster_plugin.py +++ b/molecule/specs/plugins/remaster_plugin.py @@ -38,9 +38,8 @@ class IsoUnpackHandler(GenericExecutionStep, BuiltinHandlerMixin): def __init__(self, *args, **kwargs): GenericExecutionStep.__init__(self, *args, **kwargs) - self.tmp_mount = tempfile.mkdtemp(prefix = "molecule", dir = "/var/tmp") - self.tmp_squash_mount = tempfile.mkdtemp(prefix = "molecule", - dir = "/var/tmp") + self.tmp_mount = molecule.utils.mkdtemp() + self.tmp_squash_mount = molecule.utils.mkdtemp() self.iso_mounted = False self.squash_mounted = False self.metadata['cdroot_path'] = None @@ -56,8 +55,7 @@ class IsoUnpackHandler(GenericExecutionStep, BuiltinHandlerMixin): # setup chroot unpack dir # can't use /tmp because it could be mounted with "special" options - unpack_prefix = tempfile.mkdtemp(prefix = "molecule", dir = "/var/tmp", - suffix = "chroot") + unpack_prefix = molecule.utils.mkdtemp(suffix = "chroot") self.metadata['chroot_tmp_dir'] = unpack_prefix self.metadata['chroot_unpack_path'] = os.path.join(unpack_prefix, "root")