From 9bf8964edd0522b106c3b6567b43b306fc26ad6f Mon Sep 17 00:00:00 2001 From: "wbinventor@gmail.com" Date: Sun, 6 Dec 2015 17:45:27 -0500 Subject: [PATCH] Made DeprecationWarning for Cell.add_surface(...) only print once --- openmc/universe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/universe.py b/openmc/universe.py index 0e405e9f18..7e93981afa 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -240,7 +240,7 @@ class Cell(object): """ - warnings.simplefilter('always', DeprecationWarning) + warnings.simplefilter('once', DeprecationWarning) warnings.warn("Cell.add_surface(...) has been deprecated and may be " "removed in a future version. The region for a Cell " "should be defined using the region property directly.",