Remove more nesting in python_helper

This commit is contained in:
Adam Vandenberg 2013-07-02 10:21:45 -07:00
parent eafa7a141d
commit 53c97c3c96

View File

@ -55,9 +55,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
filtered_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?
return py
else
return py if !block_given?
puts "brew: Python block (#{py.binary})..." if ARGV.verbose? && ARGV.debug?
# Ensure env changes are only temporary
begin
@ -86,5 +85,4 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
ENV.replace(old_env)
end
end
end
end