Skip to content

Commit

Permalink
Fix deploy_brew rule to be compatible with Python 2 (typedb#289)
Browse files Browse the repository at this point in the history
## What is the goal of this PR?

Allow running `deploy_brew` with Python 2 being active system-wide

## What are the changes implemented in this PR?

Fix "TypeError: list object is not an iterator" error by making an iterator out of a list
  • Loading branch information
vmax authored Mar 17, 2021
1 parent b99cc5e commit 5821596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brew/templates/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


def get_distribution_url_from_formula(content):
url_line = next(filter(lambda l: l.lstrip().startswith('url'), content.split('\n')))
url_line = next(iter(filter(lambda l: l.lstrip().startswith('url'), content.split('\n'))))
url = url_line.strip().split(' ')[1].replace('"', '')
return url

Expand Down

0 comments on commit 5821596

Please sign in to comment.