Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed bug where if you supply a floating point value for something th…
Browse files Browse the repository at this point in the history
…at expects an integer, it raised an exception. Now it just converts it to int and moves on.
  • Loading branch information
daminton committed Nov 22, 2022
1 parent 43afc02 commit f0fb208
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/swiftest/swiftest/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f0fb208

Please sign in to comment.