Skip to content

Commit 1d4e8ab

Browse files
Add back OSError handling that was removed in 48e1ba8
1 parent 5294aa6 commit 1d4e8ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

madoop/mapreduce.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def map_single_chunk(exe, input_path, output_path, chunk):
199199
input=chunk,
200200
stdout=outfile,
201201
)
202-
except subprocess.CalledProcessError as err:
202+
except (subprocess.CalledProcessError, OSError) as err:
203203
raise MadoopError(
204204
f"Command returned non-zero: "
205205
f"{exe} < {input_path} > {output_path}"
@@ -420,7 +420,7 @@ def reduce_single_file(exe, input_path, output_path):
420420
stdin=infile,
421421
stdout=outfile,
422422
)
423-
except subprocess.CalledProcessError as err:
423+
except (subprocess.CalledProcessError, OSError) as err:
424424
raise MadoopError(
425425
f"Command returned non-zero: "
426426
f"{exe} < {input_path} > {output_path}"

0 commit comments

Comments
 (0)