Open and close file descriptors.

We noticed this when working on the Bodhi integration.

Signed-off-by: Ralph Bean <rbean@redhat.com>
This commit is contained in:
Ralph Bean 2017-10-10 12:47:21 -04:00
parent c89f033457
commit 97d52d03c8
4 changed files with 11 additions and 5 deletions

View file

@ -85,7 +85,8 @@ def get_compose_dir(topdir, conf, compose_type="production", compose_date=None,
continue
break
open(os.path.join(compose_dir, "COMPOSE_ID"), "w").write(ci.compose.id)
with open(os.path.join(compose_dir, "COMPOSE_ID"), "w") as f:
f.write(ci.compose.id)
work_dir = os.path.join(compose_dir, "work", "global")
makedirs(work_dir)
ci.dump(os.path.join(work_dir, "composeinfo-base.json"))