Skip to content

Commit 025451b

Browse files
committed
Fix calls to save_config.
The `save_config` function expects a file-like object, not a filename. Unclear to me why Mypy didn't catch that...
1 parent 0f14f35 commit 025451b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/incatools/odk/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ def seed(
321321

322322
tgt_project_file = "{}/project.yaml".format(outdir)
323323
if project.export_project_yaml:
324-
save_config(project, tgt_project_file)
324+
with open(tgt_project_file, "w") as f:
325+
save_config(project, f)
325326
tgts.append(tgt_project_file)
326327
if source is not None:
327328
copy(
@@ -335,7 +336,8 @@ def seed(
335336
if config is not None:
336337
copy(config, odk_config_file)
337338
else:
338-
save_config(project, odk_config_file)
339+
with open(odk_config_file, "w") as f:
340+
save_config(project, f)
339341
logging.info("Created files:")
340342
for tgt in tgts:
341343
logging.info(" File: {}".format(tgt))

0 commit comments

Comments
 (0)