diff --git a/tugui/tu_interface.py b/tugui/tu_interface.py index 3ad5481..8d04558 100644 --- a/tugui/tu_interface.py +++ b/tugui/tu_interface.py @@ -201,7 +201,7 @@ def save_loaded_inp(self) -> str: check_file_existence(os.path.join(self.inp_dir, plireader.mac_path), 'mac') check_file_existence(os.path.join(self.inp_dir, plireader.mic_path), 'mic') # Check the .sta file existence only if required, i.e if the 'ISTATI' field is '1' - if plireader.opt_dict['ISTATI'] == 1: + if int(plireader.opt_dict['ISTATI']): check_file_existence(os.path.join(self.inp_dir, plireader.sta_path), 'sta') # Declare a string holding the .inp filename (with default to 'TuPlot') @@ -509,7 +509,7 @@ def init_PliReader(pli_path: str) -> Self: pli_reader.sta_dataset = f.readline().split()[0] # Extract the number of axial sections depending on the ISLICE field - if pli_reader.opt_dict['ISLICE'] == 1: + if int(pli_reader.opt_dict['ISLICE']): pli_reader.axial_steps = int(pli_reader.opt_dict['M3']) else: pli_reader.axial_steps = int(pli_reader.opt_dict['M3']) + 1