summaryrefslogtreecommitdiff
path: root/lib/spack/spack/repository.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/repository.py')
-rw-r--r--lib/spack/spack/repository.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py
index d751a98b35..2d8dc39648 100644
--- a/lib/spack/spack/repository.py
+++ b/lib/spack/spack/repository.py
@@ -68,6 +68,7 @@ NOT_PROVIDED = object()
def _autospec(function):
"""Decorator that automatically converts the argument of a single-arg
function to a Spec."""
+
def converter(self, spec_like, *args, **kwargs):
if not isinstance(spec_like, spack.spec.Spec):
spec_like = spack.spec.Spec(spec_like)
@@ -77,6 +78,7 @@ def _autospec(function):
class SpackNamespace(ModuleType):
""" Allow lazy loading of modules."""
+
def __init__(self, namespace):
super(SpackNamespace, self).__init__(namespace)
self.__file__ = "(spack namespace)"
@@ -112,6 +114,7 @@ class RepoPath(object):
combined results of the Repos in its list instead of on a
single package repository.
"""
+
def __init__(self, *repo_dirs, **kwargs):
# super-namespace for all packages in the RepoPath
self.super_namespace = kwargs.get('namespace', repo_namespace)
@@ -360,6 +363,7 @@ class Repo(object):
A Python namespace where the repository's packages should live.
"""
+
def __init__(self, root, namespace=repo_namespace):
"""Instantiate a package repository from a filesystem path.
@@ -923,6 +927,7 @@ class PackageLoadError(spack.error.SpackError):
class UnknownPackageError(PackageLoadError):
"""Raised when we encounter a package spack doesn't have."""
+
def __init__(self, name, repo=None):
msg = None
if repo:
@@ -935,6 +940,7 @@ class UnknownPackageError(PackageLoadError):
class UnknownNamespaceError(PackageLoadError):
"""Raised when we encounter an unknown namespace"""
+
def __init__(self, namespace):
super(UnknownNamespaceError, self).__init__(
"Unknown namespace: %s" % namespace)
@@ -942,6 +948,7 @@ class UnknownNamespaceError(PackageLoadError):
class FailedConstructorError(PackageLoadError):
"""Raised when a package's class constructor fails."""
+
def __init__(self, name, exc_type, exc_obj, exc_tb):
super(FailedConstructorError, self).__init__(
"Class constructor failed for package '%s'." % name,