lib/pycall/libpython/finder.rb in pycall-1.2.1 vs lib/pycall/libpython/finder.rb in pycall-1.3.0.dev
- old
+ new
@@ -25,15 +25,15 @@
].freeze
def find_python_config(python = nil)
python ||= DEFAULT_PYTHON
Array(python).each do |python_cmd|
- python_config = investigate_python_config(python_cmd)
- return [python_cmd, python_config] unless python_config.empty?
+ begin
+ python_config = investigate_python_config(python_cmd)
+ return [python_cmd, python_config] unless python_config.empty?
+ rescue
+ end
end
- rescue
- raise ::PyCall::PythonNotFound
- else
raise ::PyCall::PythonNotFound
end
def find_libpython(python = nil)
debug_report("find_libpython(#{python.inspect})")