mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* replace usage of `IOError` as it is an alias to `OSError`
* replace usage of `socket.error` as it is an alias to `OSError`
* use subclasses of `OSError` rather than inspecting `errno`s
* utilize `exist_ok` parameter of `os.makedirs` rather than ignoring
`FileExistsError`
Make the following changes to the exception handling this patch already
updates to be consistent with the new code:
* use `ex` as a name for exception being handled
* use `from ex` when re-raising exception for additional context
* use f-strings and `!r` for quoting
* pass exceptions to the `exception` parameter of `fail_json`
* use `display.error_as_warning` rather than passing stringified
exception into `display.warning`
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit
|
7 months ago | |
|---|---|---|
| .. | ||
| mypy | 8 months ago | |
| ansible-requirements.json | 4 years ago | |
| ansible-requirements.py | 3 years ago | |
| black.json | 7 months ago | |
| black.py | 10 months ago | |
| black.requirements.in | 10 months ago | |
| black.requirements.txt | 7 months ago | |
| boilerplate.json | 2 years ago | |
| boilerplate.py | 1 year ago | |
| deprecated-config.json | 6 years ago | |
| deprecated-config.py | 7 months ago | |
| deprecated-config.requirements.in | 2 years ago | |
| deprecated-config.requirements.txt | 9 months ago | |
| mypy.json | 1 year ago | |
| mypy.py | 7 months ago | |
| mypy.requirements.in | 11 months ago | |
| mypy.requirements.txt | 7 months ago | |
| no-unwanted-characters.json | 2 years ago | |
| no-unwanted-characters.py | 7 months ago | |
| no-unwanted-files.json | 6 years ago | |
| no-unwanted-files.py | 7 months ago | |
| obsolete-files.json | 2 years ago | |
| obsolete-files.py | 10 months ago | |
| package-data.json | 1 year ago | |
| package-data.py | 7 months ago | |
| package-data.requirements.in | 1 year ago | |
| package-data.requirements.txt | 7 months ago | |
| pymarkdown.config.json | 2 years ago | |
| pymarkdown.json | 2 years ago | |
| pymarkdown.py | 7 months ago | |
| pymarkdown.requirements.in | 2 years ago | |
| pymarkdown.requirements.txt | 7 months ago | |
| release-names.json | 6 years ago | |
| release-names.py | 3 years ago | |
| required-and-default-attributes.json | 6 years ago | |
| required-and-default-attributes.py | 12 months ago | |
| skip.txt | 6 years ago | |
| test-constraints.json | 5 years ago | |
| test-constraints.py | 7 months ago | |
| update-bundled.json | 6 years ago | |
| update-bundled.py | 7 months ago | |
| update-bundled.requirements.in | 4 years ago | |
| update-bundled.requirements.txt | 7 months ago | |