From 838f84c963dbf5fe0f80b02bec2f056a3fd4036f Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 9 May 2016 08:33:18 -0500 Subject: [PATCH] Respond to @wbinventor comments on #642 --- openmc/statepoint.py | 6 +++--- openmc/universe.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openmc/statepoint.py b/openmc/statepoint.py index 6c8af88a7..19aa3dbaf 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -622,8 +622,6 @@ class StatePoint(object): Raises ------ - RuntimeError - If a Summary object has already been linked. ValueError An error when the argument passed to the 'summary' parameter is not an openmc.Summary object. @@ -631,7 +629,9 @@ class StatePoint(object): """ if self.summary is not None: - raise RuntimeError('A Summary object has already been linked.') + warnings.warn('A Summary object has already been linked.', + RuntimeWarning) + return if not isinstance(summary, openmc.summary.Summary): msg = 'Unable to link statepoint with "{0}" which ' \ diff --git a/openmc/universe.py b/openmc/universe.py index 8834eaa52..770e789da 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -36,8 +36,8 @@ class Universe(object): automatically be assigned name : str, optional Name of the universe. If not specified, the name is the empty string. - cells : Iterable of openmc.Cell - Cells to add to the universe + cells : Iterable of openmc.Cell, optional + Cells to add to the universe. By default no cells are added. Attributes ----------