Blob Blame History Raw
From 13a174bdccec93b68f8a6fc6cae4a16fbda4712a Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Sat, 25 May 2019 13:36:10 +0200
Subject: [PATCH 6/9] Fix encode method call

This broke with
--define="%_buildhost foo"
---
 osc/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osc/build.py b/osc/build.py
index 457249e..325e2a9 100644
--- a/osc/build.py
+++ b/osc/build.py
@@ -695,7 +695,7 @@ def main(apiurl, opts, argv):
         s = ''
         for i in opts.define:
             s += "%%define %s\n" % i
-        build_descr_data = s.encode + build_descr_data
+        build_descr_data = s.encode() + build_descr_data
 
     cpiodata = None
     servicefile = os.path.join(os.path.dirname(build_descr), "_service")
-- 
2.21.0