diff options
| author | Samuel John | 2013-06-04 21:47:22 +0200 |
|---|---|---|
| committer | Samuel John | 2013-06-04 22:07:15 +0200 |
| commit | 3e38d802b77f0b22fea727a4a8acbaf1439b37ff (patch) | |
| tree | c64fce96f3bcd4f7e15d4a62048e589f6d81093e | |
| parent | 42671fab457d9d8aae2338993bda47f714ae0fa4 (diff) | |
| download | homebrew-3e38d802b77f0b22fea727a4a8acbaf1439b37ff.tar.bz2 | |
python_helper style bit
| -rw-r--r-- | Library/Homebrew/python_helper.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb index efc5a12a7..d17bbacee 100644 --- a/Library/Homebrew/python_helper.rb +++ b/Library/Homebrew/python_helper.rb @@ -47,7 +47,9 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block) python_reqs.sort_by{ |py| py.version }.map do |py| # Now is the time to set the site_packages to the correct value py.site_packages = lib/py.xy/'site-packages' - if block_given? + if !block_given? + return py + else puts "brew: Python block (#{py.binary})..." if ARGV.verbose? && ARGV.debug? require 'superenv' # Ensure env changes are only temporary by using `with_build_environment` @@ -70,9 +72,6 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block) @current_python = nil res end - else - # We return the first available python, because no block_given? - return py end end end |
