From 76b2b65ab8e7233bfbc49663b9792c41edfc69bc Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 27 Apr 2016 18:13:32 -0400 Subject: [PATCH] Use basestring instead of str --- openmc/material.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/material.py b/openmc/material.py index 17283d4dd..97c7cedca 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -281,7 +281,7 @@ class Material(object): 'macroscopic data-set has already been added'.format(self._id) raise ValueError(msg) - if not isinstance(nuclide, (openmc.Nuclide, str)): + if not isinstance(nuclide, (openmc.Nuclide, basestring)): msg = 'Unable to add a Nuclide to Material ID="{0}" with a ' \ 'non-Nuclide value "{1}"'.format(self._id, nuclide) raise ValueError(msg) @@ -401,7 +401,7 @@ class Material(object): 'macroscopic data-set has already been added'.format(self._id) raise ValueError(msg) - if not isinstance(element, (openmc.Element, str)): + if not isinstance(element, (openmc.Element, basestring)): msg = 'Unable to add an Element to Material ID="{0}" with a ' \ 'non-Element value "{1}"'.format(self._id, element) raise ValueError(msg)