From f0fb208c21aa09ef622cbc2abae8dce1408c20e0 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 21 Nov 2022 22:52:57 -0500 Subject: [PATCH] Fixed bug where if you supply a floating point value for something that expects an integer, it raised an exception. Now it just converts it to int and moves on. --- python/swiftest/swiftest/io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/swiftest/swiftest/io.py b/python/swiftest/swiftest/io.py index 3f5008bb9..e4d5ff139 100644 --- a/python/swiftest/swiftest/io.py +++ b/python/swiftest/swiftest/io.py @@ -175,11 +175,11 @@ def read_swiftest_param(param_file_name, param, verbose=True): param[uc] = param[uc].upper() for i in int_param: - if i in param and type(i) != int: - param[i] = int(param[i]) + if i in param and type(param[i]) != int: + param[i] = int(float(param[i])) for f in float_param: - if f in param and type(f) is str: + if f in param and type(param[f]) is str: param[f] = real2float(param[f]) for b in bool_param: