Skip to content

Commit

Permalink
Merge pull request #80 from eecs485staff/add-back-OSError
Browse files Browse the repository at this point in the history
Catch more `OSError`s
  • Loading branch information
awdeorio authored Nov 8, 2024
2 parents 5294aa6 + ac60215 commit 042f54b
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 042f54b

Please sign in to comment.