summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package/easy_install.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/package/easy_install.rb')
-rw-r--r--lib/chef/provider/package/easy_install.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/package/easy_install.rb b/lib/chef/provider/package/easy_install.rb
index 90727b738d..2f7880bf08 100644
--- a/lib/chef/provider/package/easy_install.rb
+++ b/lib/chef/provider/package/easy_install.rb
@@ -32,10 +32,10 @@ class Chef
begin
# first check to see if we can import it
- output = shell_out!("#{python_binary_path} -c \"import #{name}\"", :returns=>[0,1]).stderr
+ output = shell_out_with_timeout!("#{python_binary_path} -c \"import #{name}\"", :returns=>[0,1]).stderr
if output.include? "ImportError"
# then check to see if its on the path
- output = shell_out!("#{python_binary_path} -c \"import sys; print sys.path\"", :returns=>[0,1]).stdout
+ output = shell_out_with_timeout!("#{python_binary_path} -c \"import sys; print sys.path\"", :returns=>[0,1]).stdout
if output.downcase.include? "#{name.downcase}"
check = true
end
@@ -73,10 +73,10 @@ class Chef
package_version = nil
if install_check(module_name)
begin
- output = shell_out!("#{python_binary_path} -c \"import #{module_name}; print #{module_name}.__version__\"").stdout
+ output = shell_out_with_timeout!("#{python_binary_path} -c \"import #{module_name}; print #{module_name}.__version__\"").stdout
package_version = output.strip
rescue
- output = shell_out!("#{python_binary_path} -c \"import sys; print sys.path\"", :returns=>[0,1]).stdout
+ output = shell_out_with_timeout!("#{python_binary_path} -c \"import sys; print sys.path\"", :returns=>[0,1]).stdout
output_array = output.gsub(/[\[\]]/,'').split(/\s*,\s*/)
package_path = ""
@@ -107,7 +107,7 @@ class Chef
return @candidate_version if @candidate_version
# do a dry run to get the latest version
- result = shell_out!("#{easy_install_binary_path} -n #{@new_resource.package_name}", :returns=>[0,1])
+ result = shell_out_with_timeout!("#{easy_install_binary_path} -n #{@new_resource.package_name}", :returns=>[0,1])
@candidate_version = result.stdout[/(.*)Best match: (.*) (.*)$/, 3]
@candidate_version
end