From 9f284e1f3b161e13f17677733b54c418761fe6dd Mon Sep 17 00:00:00 2001 From: Andy Gale Date: Wed, 23 May 2012 22:36:30 +0100 Subject: [PATCH] Changes to ensure cookbook works in both 0.10.8 and 0.10.10. rescue Mixlib::ShellOut::ShellCommandFailed is new in 0.10.10 rescue Chef::Exceptions::ShellCommandFailed is required by 0.10.8 rescue NameError handles the missing Mixlib::etc for 0.10.8. --- providers/pip.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/pip.rb b/providers/pip.rb index 0a559de..31a0b11 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -127,6 +127,8 @@ def current_installed_version p = shell_out!(version_check_cmd) p.stdout.split(delimeter)[1].strip rescue Chef::Exceptions::ShellCommandFailed + rescue Mixlib::ShellOut::ShellCommandFailed + rescue NameError end end