diff --git a/openmc/material.py b/openmc/material.py index 87cc6befaa..202f46c1ba 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -380,7 +380,7 @@ class Material(object): cv.check_value('density units', units, DENSITY_UNITS) self._density_units = units - if units is 'sum': + if units == 'sum': if density is not None: msg = 'Density "{}" for Material ID="{}" is ignored ' \ 'because the unit is "sum"'.format(density, self.id) diff --git a/openmc/model/triso.py b/openmc/model/triso.py index 046bd45159..2090dc977d 100644 --- a/openmc/model/triso.py +++ b/openmc/model/triso.py @@ -970,13 +970,13 @@ def pack_trisos(radius, fill, domain_shape='cylinder', domain_length=None, raise ValueError('"domain_radius" must be specified for {} domain ' 'geometry '.format(domain_shape)) - if domain_shape is 'cube': + if domain_shape == 'cube': domain = _CubicDomain(length=domain_length, particle_radius=radius, center=domain_center) - elif domain_shape is 'cylinder': + elif domain_shape == 'cylinder': domain = _CylindricalDomain(length=domain_length, radius=domain_radius, particle_radius=radius, center=domain_center) - elif domain_shape is 'sphere': + elif domain_shape == 'sphere': domain = _SphericalDomain(radius=domain_radius, particle_radius=radius, center=domain_center)