Merge pull request #40648 from terminalmage/py3-gitfs-fix

Fix gitfs' write_file functions for Python 3
This commit is contained in:
Mike Place 2017-04-11 16:21:33 -06:00 committed by GitHub
commit 892d9a5511

View File

@ -1153,7 +1153,7 @@ class GitPython(GitProvider):
'''
Using the blob object, write the file to the destination path
'''
with salt.utils.fopen(dest, 'w+') as fp_:
with salt.utils.fopen(dest, 'wb+') as fp_:
blob.stream_data(fp_)
@ -1819,7 +1819,7 @@ class Pygit2(GitProvider):
'''
Using the blob object, write the file to the destination path
'''
with salt.utils.fopen(dest, 'w+') as fp_:
with salt.utils.fopen(dest, 'wb+') as fp_:
fp_.write(blob.data)