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)