Skip to content

Commit

Permalink
respond to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Apr 26, 2018
1 parent 2a1e555 commit 4cb2a18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/python/pants/bin/engine_initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def setup_legacy_graph(pants_ignore_patterns,
if not build_file_aliases:
build_file_aliases = EngineInitializer.get_default_build_file_aliases()

if not rules:
rules = []

symbol_table = LegacySymbolTable(build_file_aliases)

project_tree = FileSystemProjectTree(build_root, pants_ignore_patterns)
Expand All @@ -174,8 +177,6 @@ def setup_legacy_graph(pants_ignore_patterns,

# Create a Scheduler containing graph and filesystem tasks, with no installed goals. The
# LegacyBuildGraph will explicitly request the products it needs.
if not rules:
rules = []
tasks = (
create_legacy_graph_tasks(symbol_table) +
create_fs_rules() +
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/build_graph/build_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def register_rules(self, rules):
"""

if not isinstance(rules, Iterable):
raise TypeError('The rules must be an iterable, given {}'.format(rules))
raise TypeError('The rules must be an iterable, given {!r}'.format(rules))
self._rules.extend(rules)

def rules(self):
Expand Down

0 comments on commit 4cb2a18

Please sign in to comment.