Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
""" A command from the Execute provider did not return the expected return
code. """
returncode = 133
""" returns error code 133 to the invoking environment. """
class NoValidPolicy(ParseError):
""" There is no valid policy for the resource. """
returncode = 135
""" returns error code 135 to the invoking environment. """
class NonConformingPolicy(ParseError):
""" A policy has been specified, or has been chosen by default, but the
parameters provided for the resource do not match those required for the
policy. Check the documentation to ensure you have provided all required
parameters. """
returncode = 136
""" returns error code 136 to the invoking environment. """
class NoSuitableProviders(ParseError):
""" There are no suitable providers available for the policy and resource
chosen. This may be because a provider has not been written for this
Operating System or service, or it may be that you have not specified the
parameters correctly. """
returncode = 137
class UnmodifiedAsset(ExecutionError):
""" An asset was requested unnecesarily. This indicates an error in cache
handling and should be filed as a bug against Yaybu. """
returncode = 153
class ArgParseError(ParseError):
""" Error parsing an argument that was applied to a config """
returncode = 154
class TemplateError(ParseError):
""" Error handling a template """
returncode = 155
class InvalidCredsError(ExecutionError):
""" Invalid credentials """
returncode = 156
class ValueError(ExecutionError):
""" Invalid value passed to a part """
returncode = 157
parameters. """
returncode = 136
""" returns error code 136 to the invoking environment. """
class NoSuitableProviders(ParseError):
""" There are no suitable providers available for the policy and resource
chosen. This may be because a provider has not been written for this
Operating System or service, or it may be that you have not specified the
parameters correctly. """
returncode = 137
""" returns error code 137 to the invoking environment. """
class TooManyProviders(ParseError):
""" More than one provider matches the specified resource, and Yaybu is unable to choose between them. """
returncode = 138
""" returns error code 138 to the invoking environment. """
class InvalidProvider(ExecutionError):
""" A provider is not valid. This is detected before any changes have been
applied. """
returncode = 139
""" returns error code 139 to the invoking environment. """
class InvalidGroup(ExecutionError):
All yaybu errors have a returncode, which is returned from the yaybu program
if these errors occur. This is primarily for the test harness, but feel free
to rely on these, they should be stable.
A returncode of less than 128 is an error from within the range specified in
the errno library, which contains the standard C error codes.
These may have been actually returned from a shell command, or they may be
based on our interpretation of the failure mode they represent. Resources will
define the errors they may return. """
import errno
from yay.errors import ParseError, NoMatching, EvaluationError # noqa
ParseError.returncode = 128
class BindingError(ParseError):
""" An error during policy binding. """
returncode = 129
""" returns error code 129 to the invoking environment. """
class ExecutionError(EvaluationError):
""" Root of exceptions that are caused by execution failing in an unexpected way. """
returncode = 130
""" returns error code 130 to the invoking environment. """
returncode = 135
""" returns error code 135 to the invoking environment. """
class NonConformingPolicy(ParseError):
""" A policy has been specified, or has been chosen by default, but the
parameters provided for the resource do not match those required for the
policy. Check the documentation to ensure you have provided all required
parameters. """
returncode = 136
""" returns error code 136 to the invoking environment. """
class NoSuitableProviders(ParseError):
""" There are no suitable providers available for the policy and resource
chosen. This may be because a provider has not been written for this
Operating System or service, or it may be that you have not specified the
parameters correctly. """
returncode = 137
""" returns error code 137 to the invoking environment. """
class TooManyProviders(ParseError):
""" More than one provider matches the specified resource, and Yaybu is unable to choose between them. """
returncode = 138
""" returns error code 138 to the invoking environment. """
to rely on these, they should be stable.
A returncode of less than 128 is an error from within the range specified in
the errno library, which contains the standard C error codes.
These may have been actually returned from a shell command, or they may be
based on our interpretation of the failure mode they represent. Resources will
define the errors they may return. """
import errno
from yay.errors import ParseError, NoMatching, EvaluationError # noqa
ParseError.returncode = 128
class BindingError(ParseError):
""" An error during policy binding. """
returncode = 129
""" returns error code 129 to the invoking environment. """
class ExecutionError(EvaluationError):
""" Root of exceptions that are caused by execution failing in an unexpected way. """
returncode = 130
""" returns error code 130 to the invoking environment. """
class DpkgError(ExecutionError):
class AptError(ExecutionError):
""" An apt command failed unrecoverably. """
returncode = 132
""" returns error code 132 to the invoking environment. """
class CommandError(ExecutionError):
""" A command from the Execute provider did not return the expected return
code. """
returncode = 133
""" returns error code 133 to the invoking environment. """
class NoValidPolicy(ParseError):
""" There is no valid policy for the resource. """
returncode = 135
""" returns error code 135 to the invoking environment. """
class NonConformingPolicy(ParseError):
""" A policy has been specified, or has been chosen by default, but the
parameters provided for the resource do not match those required for the
policy. Check the documentation to ensure you have provided all required
parameters. """
returncode = 136
""" returns error code 136 to the invoking environment. """
class MissingDependency(ExecutionError):
""" A dependency required for a feature or provider is missing """
returncode = 152
class UnmodifiedAsset(ExecutionError):
""" An asset was requested unnecesarily. This indicates an error in cache
handling and should be filed as a bug against Yaybu. """
returncode = 153
class ArgParseError(ParseError):
""" Error parsing an argument that was applied to a config """
returncode = 154
class TemplateError(ParseError):
""" Error handling a template """
returncode = 155
class InvalidCredsError(ExecutionError):
""" Invalid credentials """
returncode = 156