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>
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.