From 40a64f785f62cd74ca78d53ba47966cdbddcc885 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Wed, 8 Apr 2020 09:25:45 -0500 Subject: [PATCH] Set argc in one place as suggested by @paulromano. --- openmc/lib/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openmc/lib/core.py b/openmc/lib/core.py index 3220fa343..54f33b616 100644 --- a/openmc/lib/core.py +++ b/openmc/lib/core.py @@ -185,11 +185,10 @@ def init(args=None, intracomm=None): """ if args is not None: args = ['openmc'] + list(args) - argc = len(args) else: args = ['openmc'] - argc = 1 + argc = len(args) # Create the argv array. Note that it is actually expected to be of # length argc + 1 with the final item being a null pointer. argv = (POINTER(c_char) * (argc + 1))()