write binary data to ks file

Fixes: https://pagure.io/koji/issue/1617
This commit is contained in:
Tomas Kopecek 2019-08-15 16:02:42 +02:00
parent 650d748757
commit 0c9ecf3f7c

View file

@ -3544,7 +3544,7 @@ class OzImageTask(BaseTaskHandler):
tops['tempdir'] = self.workdir
with koji.openRemoteFile(ksfile, **tops) as ks_src:
kspath = os.path.join(self.workdir, os.path.basename(ksfile))
with open(kspath, 'w') as ks_dest:
with open(kspath, 'wb') as ks_dest:
ks_dest.write(ks_src.read())
self.logger.debug('uploading kickstart from here: %s' % kspath)
self.uploadFile(kspath) # upload the original ks file