write msgpack as binary

This commit is contained in:
David Boucha 2014-02-07 14:22:20 -07:00
parent bfebaae470
commit 69a1f7f3f8

View File

@ -66,7 +66,7 @@ def genrepo():
revmap[repodata['full_name']] = pkgname
ret.setdefault('repo', {}).update(config)
ret.setdefault('name_map', {}).update(revmap)
with salt.utils.fopen(os.path.join(repo, winrepo), 'w') as repo:
with salt.utils.fopen(os.path.join(repo, winrepo), 'w+b') as repo:
repo.write(msgpack.dumps(ret))
salt.output.display_output(ret, 'pprint', __opts__)
return ret