summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/multimethod/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/multimethod/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/multimethod/package.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py
index 9e18d65cbb..c0e347bc93 100644
--- a/var/spack/repos/builtin.mock/packages/multimethod/package.py
+++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py
@@ -22,6 +22,8 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+from six import string_types
+
from spack import *
import spack.architecture
@@ -102,14 +104,14 @@ class Multimethod(MultimethodBase):
# Make sure we can switch methods on different target
#
platform = spack.architecture.platform()
- targets = platform.targets.values()
+ targets = list(platform.targets.values())
if len(targets) > 1:
targets = targets[:-1]
for target in targets:
@when('target=' + target.name)
def different_by_target(self):
- if isinstance(self.spec.architecture.target, basestring):
+ if isinstance(self.spec.architecture.target, string_types):
return self.spec.architecture.target
else:
return self.spec.architecture.target.name