From 8774e5557145de3af9965298e4ea33e7f2ab3636 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 10 Aug 2013 19:14:34 -0300 Subject: [PATCH] Remove spurious uses of output return values There are several places in the code where out is collected but not used. These make the code harder to reason about. Remove them and only actually get the output if we care. Change-Id: I0280df56538fc7a56ee2d2bb47f05908270a3045 --- pypi_mirror/cmd/run_mirror.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pypi_mirror/cmd/run_mirror.py b/pypi_mirror/cmd/run_mirror.py index d3b748e..a25d3d1 100644 --- a/pypi_mirror/cmd/run_mirror.py +++ b/pypi_mirror/cmd/run_mirror.py @@ -201,11 +201,11 @@ class Mirror(object): if short_project.endswith('.git'): short_project = short_project[:-4] if not os.path.isdir(short_project): - out = self.run_command("git clone %s %s" % - (project, short_project)) + self.run_command( + "git clone %s %s" % (project, short_project)) self.chdir(os.path.join(project_cache_dir, short_project)) - out = self.run_command("git fetch -p origin") + self.run_command("git fetch -p origin") if self.args.branch: branches = [self.args.branch] @@ -219,8 +219,8 @@ class Mirror(object): print("Fetching pip requires for %s:%s" % (project, branch)) if not self.args.no_update: - out = self.run_command("git reset --hard %s" % branch) - out = self.run_command("git clean -x -f -d -q") + self.run_command("git reset --hard %s" % branch) + self.run_command("git clean -x -f -d -q") reqlist = [] if os.path.exists('global-requirements.txt'): reqlist.append('global-requirements.txt') @@ -232,7 +232,7 @@ class Mirror(object): if os.path.exists(requires_file): reqlist.append(requires_file) if reqlist: - out = self.run_command( + self.run_command( venv_format % dict( extra_search_dir=pip_cache_dir, venv_dir=venv)) # Need to do these separately. If you attempt to upgrade @@ -265,7 +265,7 @@ class Mirror(object): (reqfp, reqfn) = tempfile.mkstemp() os.write(reqfp, '\n'.join(new_reqs)) os.close(reqfp) - out = self.run_command( + self.run_command( wheel_file_format % dict( pip=pip, download_cache=pip_cache_dir, find_links=wheelhouse, wheel_dir=wheelhouse, @@ -291,11 +291,11 @@ class Mirror(object): for r in requires: reqfd.write(r + "\n") reqfd.close() - out = self.run_command(venv_format % dict( + self.run_command(venv_format % dict( extra_search_dir=pip_cache_dir, venv_dir=venv)) if os.path.exists(build): shutil.rmtree(build) - out = self.run_command( + self.run_command( wheel_file_format % dict( pip=pip, download_cache=pip_cache_dir, find_links=wheelhouse, wheel_dir=wheelhouse,