Skip to content

Commit 725ef99

Browse files
authored
Merge pull request #80 from shkit/check-default-pythons
Checking all pythons in DEFAULT_PYTHON.
2 parents 6fdf4c5 + 441bb2b commit 725ef99

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/pycall/libpython/finder.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class << self
2727
def find_python_config(python = nil)
2828
python ||= DEFAULT_PYTHON
2929
Array(python).each do |python_cmd|
30-
python_config = investigate_python_config(python_cmd)
31-
return [python_cmd, python_config] unless python_config.empty?
30+
begin
31+
python_config = investigate_python_config(python_cmd)
32+
return [python_cmd, python_config] unless python_config.empty?
33+
rescue
34+
end
3235
end
33-
rescue
34-
raise ::PyCall::PythonNotFound
35-
else
3636
raise ::PyCall::PythonNotFound
3737
end
3838

0 commit comments

Comments
 (0)