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:
parent
c89f033457
commit
97d52d03c8
4 changed files with 11 additions and 5 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue