Skip to content

Commit

Permalink
Update json_dump.py (#13)
Browse files Browse the repository at this point in the history
A missing dot in ```self.compression``` results in json chunks without compression.
  • Loading branch information
SultanOrazbayev authored and galtay committed Mar 27, 2019
1 parent 1aef254 commit f5cfd77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qwikidata/json_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def _write_chunk(
elif out_format == "jsonl":
fp.write("\n".join(out_lines))

if self.compression == "bz2":
if self.compression == ".bz2":
args = ["bzip2", out_fname]
subprocess.check_output(args)
out_fname = f"{out_fname}.bz2"
elif self.compression == "gz":
elif self.compression == ".gz":
args = ["gzip", out_fname]
subprocess.check_output(args)
out_fname = f"{out_fname}.gz"
Expand Down

0 comments on commit f5cfd77

Please sign in to comment.