From 5cc6e6a6844bd83e491f5b12239ce0f7850e5a15 Mon Sep 17 00:00:00 2001 From: tjlaboss Date: Thu, 30 Mar 2017 14:06:17 -0400 Subject: [PATCH] Changed `if` statement for `surfaces` Corrected `if not surfaces` to `if surfaces is None` --- openmc/region.py | 4 ++-- openmc/surface.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openmc/region.py b/openmc/region.py index 667cee5e04..9d821f93bb 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -61,7 +61,7 @@ class Region(object): Dictionary mapping surface IDs to :class:`openmc.Surface` instances """ - if not surfaces: + if surfaces is None: surfaces = OrderedDict() for region in self: surfaces = region.update_surfaces(surfaces) @@ -468,7 +468,7 @@ class Complement(Region): Dictionary mapping surface IDs to :class:`openmc.Surface` instances """ - if not surfaces: + if surfaces is None: surfaces = OrderedDict() for region in self.node: surfaces = region.update_surfaces(surfaces) diff --git a/openmc/surface.py b/openmc/surface.py index 25ab4519fa..7cbd7befd3 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1896,7 +1896,7 @@ class Halfspace(Region): Dictionary mapping surface IDs to :class:`openmc.Surface` instances """ - if not surfaces: + if surfaces is None: surfaces = OrderedDict() surfaces[self.surface.id] = self.surface