summaryrefslogtreecommitdiff
path: root/lib/spack/spack/directory_layout.py
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2023-07-05 09:04:29 -0500
committerGitHub <noreply@github.com>2023-07-05 09:04:29 -0500
commit45838cee0b8b01ad999b459ed6d19e37686859c0 (patch)
tree3770f840a478598c430081763557b96e766a2a56 /lib/spack/spack/directory_layout.py
parent95847a0b373d1fe55772ff39d58aa616bec88932 (diff)
downloadspack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.gz
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.bz2
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.xz
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.zip
Drop Python 2 super syntax (#38718)
Diffstat (limited to 'lib/spack/spack/directory_layout.py')
-rw-r--r--lib/spack/spack/directory_layout.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index abecb00918..4d4952ee38 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -388,14 +388,14 @@ class DirectoryLayoutError(SpackError):
"""Superclass for directory layout errors."""
def __init__(self, message, long_msg=None):
- super(DirectoryLayoutError, self).__init__(message, long_msg)
+ super().__init__(message, long_msg)
class RemoveFailedError(DirectoryLayoutError):
"""Raised when a DirectoryLayout cannot remove an install prefix."""
def __init__(self, installed_spec, prefix, error):
- super(RemoveFailedError, self).__init__(
+ super().__init__(
"Could not remove prefix %s for %s : %s" % (prefix, installed_spec.short_spec, error)
)
self.cause = error
@@ -405,7 +405,7 @@ class InconsistentInstallDirectoryError(DirectoryLayoutError):
"""Raised when a package seems to be installed to the wrong place."""
def __init__(self, message, long_msg=None):
- super(InconsistentInstallDirectoryError, self).__init__(message, long_msg)
+ super().__init__(message, long_msg)
class SpecReadError(DirectoryLayoutError):
@@ -416,7 +416,7 @@ class InvalidDirectoryLayoutParametersError(DirectoryLayoutError):
"""Raised when a invalid directory layout parameters are supplied"""
def __init__(self, message, long_msg=None):
- super(InvalidDirectoryLayoutParametersError, self).__init__(message, long_msg)
+ super().__init__(message, long_msg)
class InvalidExtensionSpecError(DirectoryLayoutError):
@@ -427,16 +427,14 @@ class ExtensionAlreadyInstalledError(DirectoryLayoutError):
"""Raised when an extension is added to a package that already has it."""
def __init__(self, spec, ext_spec):
- super(ExtensionAlreadyInstalledError, self).__init__(
- "%s is already installed in %s" % (ext_spec.short_spec, spec.short_spec)
- )
+ super().__init__("%s is already installed in %s" % (ext_spec.short_spec, spec.short_spec))
class ExtensionConflictError(DirectoryLayoutError):
"""Raised when an extension is added to a package that already has it."""
def __init__(self, spec, ext_spec, conflict):
- super(ExtensionConflictError, self).__init__(
+ super().__init__(
"%s cannot be installed in %s because it conflicts with %s"
% (ext_spec.short_spec, spec.short_spec, conflict.short_spec)
)