diff options
author | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2017-05-08 06:53:02 +0200 |
---|---|---|
committer | becker33 <becker33@llnl.gov> | 2017-05-07 21:53:02 -0700 |
commit | 4e44d39f1a65b3fd25929d3f9be6441888789846 (patch) | |
tree | abc76a34d95c7c3100cfb5e6aee963b910b6c0d9 /lib/spack | |
parent | b65daa93be5d88ac1b2b5d9572f57acf4d9d0f9a (diff) | |
download | spack-4e44d39f1a65b3fd25929d3f9be6441888789846.tar.gz spack-4e44d39f1a65b3fd25929d3f9be6441888789846.tar.bz2 spack-4e44d39f1a65b3fd25929d3f9be6441888789846.tar.xz spack-4e44d39f1a65b3fd25929d3f9be6441888789846.zip |
Spec.__init__: removed dead code (#4146)
The conditionals are repeated in the statement before _add_dependencies
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/spack/spec.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 399f58461f..ff213c5986 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -966,15 +966,12 @@ class Spec(object): # Spec(a, b) will copy a but just add b as a dep. deptypes = () for dep in dep_like: - if isinstance(dep, Spec): - spec = dep - elif isinstance(dep, (list, tuple)): + + if isinstance(dep, (list, tuple)): # Literals can be deptypes -- if there are tuples in the # list, they will be used as deptypes for the following Spec. deptypes = tuple(dep) continue - else: - spec = Spec(dep) spec = dep if isinstance(dep, Spec) else Spec(dep) self._add_dependency(spec, deptypes) |