From fbcbf5added1901745a36f9cf4ce4334cb8440ad Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Aug 15 2019 14:02:42 +0000 Subject: write binary data to ks file Fixes: https://pagure.io/koji/issue/1617 --- diff --git a/builder/kojid b/builder/kojid index 73c2bf7..d96a8ae 100755 --- a/builder/kojid +++ b/builder/kojid @@ -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