1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ansible/errors: PEP8 compliancy (#24693)

- Make PEP8 compliant
This commit is contained in:
Dag Wieers 2017-05-18 09:34:57 +02:00 committed by John R Barker
parent 7a5e46c732
commit ac27c54c2e
2 changed files with 28 additions and 13 deletions

View file

@ -19,13 +19,15 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors.yaml_strings import ( YAML_POSITION_DETAILS,
YAML_COMMON_UNQUOTED_VARIABLE_ERROR,
from ansible.errors.yaml_strings import (
YAML_COMMON_DICT_ERROR,
YAML_COMMON_UNQUOTED_COLON_ERROR,
YAML_COMMON_LEADING_TAB_ERROR,
YAML_COMMON_PARTIALLY_QUOTED_LINE_ERROR,
YAML_COMMON_UNBALANCED_QUOTES_ERROR,
YAML_COMMON_LEADING_TAB_ERROR)
YAML_COMMON_UNQUOTED_COLON_ERROR,
YAML_COMMON_UNQUOTED_VARIABLE_ERROR,
YAML_POSITION_DETAILS,
)
from ansible.module_utils._text import to_native, to_text
@ -161,53 +163,67 @@ class AnsibleError(Exception):
return error_message
class AnsibleOptionsError(AnsibleError):
''' bad or incomplete options passed '''
pass
class AnsibleParserError(AnsibleError):
''' something was detected early that is wrong about a playbook or data file '''
pass
class AnsibleInternalError(AnsibleError):
''' internal safeguards tripped, something happened in the code that should never happen '''
pass
class AnsibleRuntimeError(AnsibleError):
''' ansible had a problem while running a playbook '''
pass
class AnsibleModuleError(AnsibleRuntimeError):
''' a module failed somehow '''
pass
class AnsibleConnectionFailure(AnsibleRuntimeError):
''' the transport / connection_plugin had a fatal error '''
pass
class AnsibleFilterError(AnsibleRuntimeError):
''' a templating failure '''
pass
class AnsibleLookupError(AnsibleRuntimeError):
''' a lookup failure '''
pass
class AnsibleCallbackError(AnsibleRuntimeError):
''' a callback failure '''
pass
class AnsibleUndefinedVariable(AnsibleRuntimeError):
''' a templating failure '''
pass
class AnsibleFileNotFound(AnsibleRuntimeError):
''' a file missing failure '''
pass
class AnsibleActionSkip(AnsibleRuntimeError):
''' an action runtime skip'''
pass
class AnsibleActionFail(AnsibleRuntimeError):
''' an action runtime failure'''
pass

View file

@ -18,7 +18,6 @@ lib/ansible/compat/__init__.py
lib/ansible/compat/selectors/__init__.py
lib/ansible/compat/tests/__init__.py
lib/ansible/constants.py
lib/ansible/errors/__init__.py
lib/ansible/executor/__init__.py
lib/ansible/executor/action_write_locks.py
lib/ansible/executor/module_common.py