ansible/ansible — pull request #5162 by JensRantil (2013-12-04 13:07:43+00:00)
Title: More don't catch `SystemExit`

This fixes issues similar to #5159. I skimmed through all occasions of `except:` in all modules (the `library` directory) and found two more cases.

I have *not* tested these cases. If anyone could verify them, that would be great.

**Also:** There's plenty of `except:`s in the modules. I've only fixed the bugs that were apparent. These bugs will definitely be be popping up as more `module.fail_json(...)` calls will be added within the `try:`s for corner cases, errors etc. I think there's a systematic error going on here. Two proposed solutions:
* Change all `except:`s to `except Exception:` when they are valid. In most cases that's what you want to do.
* Add a comment about this in the module developer's documentation. Seems like most developer don't keep track of the difference.

Comment on this?