diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/compiler.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/package.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/util/crypto.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 716356bdd2..582f49eaf2 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -189,7 +189,7 @@ class Compiler(object): return None successful = [key for key in parmap(check, checks) if key is not None] - return { (v, p, s) : path for v, p, s, path in successful } + return dict(((v, p, s), path) for v, p, s, path in successful) @classmethod def find(cls, *path): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index c5bfe21ed4..467472cced 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -176,7 +176,7 @@ def compilers_for_spec(compiler_spec): config = _get_config() def get_compiler(cspec): - items = { k:v for k,v in config.items('compiler "%s"' % cspec) } + items = dict((k,v) for k,v in config.items('compiler "%s"' % cspec)) if not all(n in items for n in _required_instance_vars): raise InvalidCompilerConfigurationError(cspec) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8df658e660..b0a9dd76b9 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -360,7 +360,7 @@ class Package(object): # Version-ize the keys in versions dict try: - self.versions = { Version(v):h for v,h in self.versions.items() } + self.versions = dict((Version(v), h) for v,h in self.versions.items()) except ValueError: raise ValueError("Keys of versions dict in package %s must be versions!" % self.name) diff --git a/lib/spack/spack/util/crypto.py b/lib/spack/spack/util/crypto.py index 4d8681bed9..950e807596 100644 --- a/lib/spack/spack/util/crypto.py +++ b/lib/spack/spack/util/crypto.py @@ -35,7 +35,7 @@ _acceptable_hashes = [ hashlib.sha512 ] """Index for looking up hasher for a digest.""" -_size_to_hash = { h().digest_size : h for h in _acceptable_hashes } +_size_to_hash = dict((h().digest_size, h) for h in _acceptable_hashes) def checksum(hashlib_algo, filename, **kwargs): |