Skip to content

Commit

Permalink
Add guard statement for case where pants test run does not require da…
Browse files Browse the repository at this point in the history
…ta from PythonCreateDistributions task.
  • Loading branch information
Chris Livingston committed Jan 30, 2018
1 parent fb1c903 commit 59ff560
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _build_requirements_pex(self, interpreter, path, req_libs, local_python_dist
dump_requirements(builder, interpreter, req_libs, self.context.log)
# Dump built python distributions, if any, into requirements pex.
built_dists = self.context.products.get_data(PythonCreateDistributions.PYTHON_DISTS)
for dist in built_dists:
builder.add_dist_location(dist)
if built_dists:
for dist in built_dists:
builder.add_dist_location(dist)
builder.freeze()
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def is_distribution(target):

def __init__(self, *args, **kwargs):
super(PythonCreateDistributions, self).__init__(*args, **kwargs)
self._distdir = self.get_options().pants_distdir

def execute(self):
dist_targets = self.context.targets(self.is_distribution)
Expand Down

0 comments on commit 59ff560

Please sign in to comment.