diff --git a/factories/weather_feeders/dat_weather_parameters.py b/factories/weather_feeders/dat_weather_parameters.py index 5e355d98..1b218230 100644 --- a/factories/weather_feeders/dat_weather_parameters.py +++ b/factories/weather_feeders/dat_weather_parameters.py @@ -24,7 +24,7 @@ class DatWeatherParameters: try: self._weather_values = pd.read_csv(self._path, sep='\s+', header=None, names=['hour', 'global_horiz', 'temperature', 'diffuse', 'beam', 'empty']) - except ValueError: + except SystemExit: sys.stderr.write(f'Error: weather file {self._path} not found\n') sys.exit() diff --git a/factories/weather_feeders/xls_weather_parameters.py b/factories/weather_feeders/xls_weather_parameters.py index 492bc5e9..d8196b7d 100644 --- a/factories/weather_feeders/xls_weather_parameters.py +++ b/factories/weather_feeders/xls_weather_parameters.py @@ -28,7 +28,7 @@ class XlsWeatherParameters: 'temperature', 'I_sol_vertical_N', 'I_sol_vertical_E', 'I_sol_vertical_S', 'I_sol_vertical_W', 'I_sol_45_N', 'I_sol_45_S', 'void', 'global_horiz', 'wind_velocity', 'humidity']) - except ValueError: + except SystemExit: sys.stderr.write(f'Error reading weather file {self._path}\n') sys.exit() @@ -44,4 +44,3 @@ class XlsWeatherParameters: building.global_horizontal['hour'] = new_value else: pd.concat([building.global_horizontal['hour'], new_value], axis=1) -