Skip to content

Commit

Permalink
Add back OSError handling that was removed in 48e1ba8
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-weingarden committed Nov 8, 2024
1 parent 5294aa6 commit 1d4e8ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions madoop/mapreduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def map_single_chunk(exe, input_path, output_path, chunk):
input=chunk,
stdout=outfile,
)
except subprocess.CalledProcessError as err:
except (subprocess.CalledProcessError, OSError) as err:
raise MadoopError(
f"Command returned non-zero: "
f"{exe} < {input_path} > {output_path}"
Expand Down Expand Up @@ -420,7 +420,7 @@ def reduce_single_file(exe, input_path, output_path):
stdin=infile,
stdout=outfile,
)
except subprocess.CalledProcessError as err:
except (subprocess.CalledProcessError, OSError) as err:
raise MadoopError(
f"Command returned non-zero: "
f"{exe} < {input_path} > {output_path}"
Expand Down

0 comments on commit 1d4e8ab

Please sign in to comment.