From 650c0a54b37b6c5a902c2058320f0bd40ce86586 Mon Sep 17 00:00:00 2001 From: Hasan Wan Date: Mon, 16 Sep 2013 10:39:38 +0300 Subject: [PATCH] Fix a mistake in f9a73b64c45fc9f97fb59f76f666ca8dfaecf6b0 Change-Id: I011c49f2e0f6933c35c05378e705f4e2355b03a9 Signed-off-by: Hasan Wan Reviewed-on: https://otctools.jf.intel.com/review/6455 Tested-by: OTC Tools Tester Reviewed-by: Eduard Bartosh --- job_load_repos.yaml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/job_load_repos.yaml.py b/job_load_repos.yaml.py index 78bc237..117d881 100755 --- a/job_load_repos.yaml.py +++ b/job_load_repos.yaml.py @@ -44,7 +44,8 @@ def update_repos_conf_on_filesystem(path_to_new_repos_conf, for repo in repos['Repositories']: repo['SnapshotDir'] = os.path.join('/srv', repo['SnapshotDir']) - os.write(path_to_repos_conf, yaml.dump(repos)) + with open(path_to_repos_conf, 'w') as repo_fh: + repo_fh.write(yaml.dump(repos)) def main(): """Script entry point. -- 2.7.4