Make sure == is used instead of 'is' in a few places

This commit is contained in:
Paul Romano 2017-05-08 08:36:35 -05:00
parent 62a1393bec
commit 281091196c
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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)