style: clean up exception definitions in package.py
This commit is contained in:
parent
498d8cf04b
commit
6837da2ad7
1 changed files with 2 additions and 7 deletions
|
@ -2280,7 +2280,6 @@ class ExternalPackageError(InstallError):
|
||||||
|
|
||||||
class PackageStillNeededError(InstallError):
|
class PackageStillNeededError(InstallError):
|
||||||
"""Raised when package is still needed by another on uninstall."""
|
"""Raised when package is still needed by another on uninstall."""
|
||||||
|
|
||||||
def __init__(self, spec, dependents):
|
def __init__(self, spec, dependents):
|
||||||
super(PackageStillNeededError, self).__init__("Cannot uninstall %s" %
|
super(PackageStillNeededError, self).__init__("Cannot uninstall %s" %
|
||||||
spec)
|
spec)
|
||||||
|
@ -2290,14 +2289,12 @@ def __init__(self, spec, dependents):
|
||||||
|
|
||||||
class PackageError(spack.error.SpackError):
|
class PackageError(spack.error.SpackError):
|
||||||
"""Raised when something is wrong with a package definition."""
|
"""Raised when something is wrong with a package definition."""
|
||||||
|
|
||||||
def __init__(self, message, long_msg=None):
|
def __init__(self, message, long_msg=None):
|
||||||
super(PackageError, self).__init__(message, long_msg)
|
super(PackageError, self).__init__(message, long_msg)
|
||||||
|
|
||||||
|
|
||||||
class PackageVersionError(PackageError):
|
class PackageVersionError(PackageError):
|
||||||
"""Raised when a version URL cannot automatically be determined."""
|
"""Raised when a version URL cannot automatically be determined."""
|
||||||
|
|
||||||
def __init__(self, version):
|
def __init__(self, version):
|
||||||
super(PackageVersionError, self).__init__(
|
super(PackageVersionError, self).__init__(
|
||||||
"Cannot determine a URL automatically for version %s" % version,
|
"Cannot determine a URL automatically for version %s" % version,
|
||||||
|
@ -2313,19 +2310,17 @@ def __init__(self, cls):
|
||||||
|
|
||||||
|
|
||||||
class ExtensionError(PackageError):
|
class ExtensionError(PackageError):
|
||||||
|
"""Superclass for all errors having to do with extension packages."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ActivationError(ExtensionError):
|
class ActivationError(ExtensionError):
|
||||||
|
"""Raised when there are problems activating an extension."""
|
||||||
def __init__(self, msg, long_msg=None):
|
def __init__(self, msg, long_msg=None):
|
||||||
super(ActivationError, self).__init__(msg, long_msg)
|
super(ActivationError, self).__init__(msg, long_msg)
|
||||||
|
|
||||||
|
|
||||||
class DependencyConflictError(spack.error.SpackError):
|
class DependencyConflictError(spack.error.SpackError):
|
||||||
"""Raised when the dependencies cannot be flattened as asked for."""
|
"""Raised when the dependencies cannot be flattened as asked for."""
|
||||||
|
|
||||||
def __init__(self, conflict):
|
def __init__(self, conflict):
|
||||||
super(DependencyConflictError, self).__init__(
|
super(DependencyConflictError, self).__init__(
|
||||||
"%s conflicts with another file in the flattened directory." % (
|
"%s conflicts with another file in the flattened directory." % (
|
||||||
|
|
Loading…
Reference in a new issue