Merge lp:~alo21/pyjuju/fix-lp956000 into lp:pyjuju
Proposed by
Alessandro Losavio
Status: | Work in progress |
---|---|
Proposed branch: | lp:~alo21/pyjuju/fix-lp956000 |
Merge into: | lp:pyjuju |
Diff against target: |
15 lines (+2/-3) 1 file modified
juju/environment/config.py (+2/-3) |
To merge this branch: | bzr merge lp:~alo21/pyjuju/fix-lp956000 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Niemeyer | Needs Fixing | ||
Clint Byrum (community) | Needs Fixing | ||
Review via email: mp+111746@code.launchpad.net |
Description of the change
Try to fix bug 956000
To post a comment you must log in.
Unmerged revisions
- 545. By Alessandro Losavio
-
fail to build from source
Hello Alessandro, thanks for submitting this patch!
Unfortunately, this is not the right way to handle the problem. Printing down deep in classes is too low level and will not allow for graceful changes in the code and/or API later on. Also I suspect you'll get other errors because you don't raise an error (and therefore, the other code keeps executing).
The right way is probably to introduce a new error class, and then use a try/except in any call sites to handle it more gracefully.. like this:
try:
whatever
except ThatError, e:
sys.exit(e)