From c8185c29c3d5d74a1709a440fa6a8bdbf9600cda Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 6 Jun 2013 10:17:10 +0000 Subject: Remove intermediate variables I find it easier to read without them, since there are less variables to remember. --- morphlib/buildcommand.py | 6 +++--- morphlib/plugins/deploy_plugin.py | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'morphlib') diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index ac230970..97c5ff86 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -333,10 +333,10 @@ class BuildCommand(object): '''Create the staging area for building a single artifact.''' self.app.status(msg='Creating staging area') - staging_dir = os.path.join(self.app.settings['tempdir'], 'staging') - tmp_staging_area_dir = tempfile.mkdtemp(dir=staging_dir) + staging_dir = tempfile.mkdtemp( + dir=os.path.join(self.app.settings['tempdir'], 'staging')) staging_area = morphlib.stagingarea.StagingArea( - self.app, tmp_staging_area_dir, build_env, use_chroot, extra_env, + self.app, staging_dir, build_env, use_chroot, extra_env, extra_path) return staging_area diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index 6b3b128f..3b2eb388 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -137,9 +137,8 @@ class DeployPlugin(cliapp.Plugin): # Unpack the artifact (tarball) to a temporary directory. self.app.status(msg='Unpacking system for configuration') - deployment_dir = os.path.join(self.app.settings['tempdir'], - 'deployments') - system_tree = tempfile.mkdtemp(dir=deployment_dir) + system_tree = tempfile.mkdtemp( + dir=os.path.join(self.app.settings['tempdir'], 'deployments')) if build_command.lac.has(artifact): f = build_command.lac.get(artifact) -- cgit v1.2.1