Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

added rescue Mixlib::ShellOut::ShellCommandFailed to the pip freeze command since that is what is being raised - #13

Closed
amitelad7 wants to merge 1 commit into
poise:masterfrom
amitelad7:master
Closed

amitelad7 wants to merge 1 commit into
poise:masterfrom
amitelad7:master

Conversation

@amitelad7

Copy link
Copy Markdown

added rescue Mixlib::ShellOut::ShellCommandFailed to the pip freeze command since that is what is being raised

@dexterous

Copy link
Copy Markdown
Contributor

Well, I suppose the Chef::Exceptions::ShellCommandFailed backcompat patch doesn't actually maintain backcompat, eh? 😞.

I guess that's 'cause everyone'll be expecting to rescue Chef::Exceptions::ShellCommandFailed when, in fact, mixlib will be throwing Mixlib::ShellOut::ShellCommandFailed which is in fact the base class of Chef::Exceptions::ShellCommandFailed.

But, I suppose rescuing from Chef::ShellOut::ShellCommandFailed exception would be better, IMHO, 'cause it still keeps us inside the Chef namespace.

Comment thread providers/pip.rb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not one too many rescues here?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to have multiple rescue clauses I think. Also helps backward compatibility, if any is desired. Please merge...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple rescues are fine and you could merge this in, but the rescue Chef::Exceptions::ShellCommandFailed is of no value at all, not even back-compat.

@jtimberman

Copy link
Copy Markdown

The rescue for 0.10.8 was resolved via COOK-1282, and is released in python cookbook v1.0.8. Thank you.

@jtimberman jtimberman closed this Aug 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants