From 1b600d10a4a0732dab9f01dc8e0b9c0ce8b083bb Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jul 30 2020 13:57:27 +0000 Subject: kojid: explicit binary writing mode Fixes: https://pagure.io/koji/issue/2411 --- diff --git a/builder/kojid b/builder/kojid index c385d5f..9f6d644 100755 --- a/builder/kojid +++ b/builder/kojid @@ -2069,7 +2069,7 @@ class WrapperRPMTask(BaseBuildTask): contents = contents.encode('utf-8') specfile = spec_template[:-5] - with open(specfile, 'w') as specfd: + with open(specfile, 'wb') as specfd: specfd.write(contents) # Run spec file sanity checks. Any failures will throw a BuildError