Fix a mistake in f9a73b64c45fc9f97fb59f76f666ca8dfaecf6b0
authorHasan Wan <hasan.wan@intel.com>
Mon, 16 Sep 2013 07:39:38 +0000 (10:39 +0300)
committerEduard Bartosh <eduard.bartosh@intel.com>
Mon, 16 Sep 2013 07:51:47 +0000 (00:51 -0700)
Change-Id: I011c49f2e0f6933c35c05378e705f4e2355b03a9
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
Reviewed-on: https://otctools.jf.intel.com/review/6455
Tested-by: OTC Tools Tester <ed.bartosh@linux.intel.com>
Reviewed-by: Eduard Bartosh <eduard.bartosh@intel.com>
job_load_repos.yaml.py

index 78bc237..117d881 100755 (executable)
@@ -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.