Skip to content

Commit

Permalink
updated get_household_clks to work on windows with archives created o…
Browse files Browse the repository at this point in the history
…n MacOS
  • Loading branch information
jsrockhill committed Sep 28, 2022
1 parent 4df6546 commit 9006492
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dcctools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ def get_household_clks_raw(self, system, schema):
self.config_json["inbox_folder"]
) / "{}_households.zip".format(system)
with ZipFile(clk_zip_path, mode="r") as clk_zip:
with clk_zip.open(
str(Path("output") / "households" / f"{schema}.json")
) as clk_file:
for file_name in clk_zip.namelist():
if f"{schema}.json" in file_name:
project_file = file_name
break
with clk_zip.open(project_file) as clk_file:
clks = clk_file.read()
return clks

Expand Down

0 comments on commit 9006492

Please sign in to comment.