Skip to content

Commit b08025e

Browse files
Jorge Fernandez Hernandezbsipocz
authored andcommitted
EUCLIDPCR-1914 Raise an exception.
1 parent 49ba59a commit b08025e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

astroquery/esa/euclid/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,8 +1231,7 @@ def get_spectrum(self, *, source_id, schema='sedm', retrieval_type="ALL", output
12311231
output_file_full_path, output_dir = self.__set_dirs(output_file=output_file, observation_id=fits_file)
12321232

12331233
if os.listdir(output_dir):
1234-
log.error(f'The directory is not empty: {output_dir}')
1235-
return
1234+
raise Exception(f'The directory is not empty: {output_dir}')
12361235

12371236
try:
12381237
self.__eucliddata.load_data(params_dict=params_dict, output_file=output_file_full_path, verbose=verbose)

0 commit comments

Comments
 (0)