mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Use basestring instead of str
This commit is contained in:
parent
37e8f455d8
commit
76b2b65ab8
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue