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
This commit is contained in:
Monty Taylor 2013-08-10 19:14:34 -03:00
parent c28dde9d68
commit 8774e55571
1 changed files with 9 additions and 9 deletions

View File

@ -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,