From 281091196c4c7ac320d9f1a07de8cc8886593cab Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 8 May 2017 08:36:35 -0500 Subject: [PATCH] Make sure == is used instead of 'is' in a few places --- openmc/material.py | 2 +- openmc/model/triso.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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)