Fix python3 encoding issues with zuul_afs
NamedTemporaryFile mode is mode='w+b' by default. Make sure we encode utf8 and write bytes to our temp file. Change-Id: I0b31abcd52c049efc7d95d6d6e39dfb5d0860620 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
cc59ca16ab
commit
ce252a9051
@ -66,7 +66,7 @@ def afs_sync(afssource, afstarget):
|
||||
filter_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
|
||||
for exclude in excludes:
|
||||
filter_file.write('- %s\n' % exclude)
|
||||
filter_file.write(b'- %s\n' % exclude.encode('utf8'))
|
||||
filter_file.close()
|
||||
|
||||
# Perform the rsync with the filter list.
|
||||
|
Loading…
Reference in New Issue
Block a user