File ticket13687.patch of Package trac

#!diff
--- trac/ticket/report.py.orig      2023-12-29 12:59:43.169424773 +0100
+++ trac/ticket/report.py   2023-12-29 12:58:32.881886381 +0100
@@ -938,10 +938,10 @@
         req.perm(self.realm, id).require('REPORT_SQL_VIEW')
 
         out = io.BytesIO()
-        out.write(b'-- ## %s: %s ## --\n\n' % (id, title.encode('utf-8')))
+        out.write(b'-- ## %s: %s ## --\n\n' % (str(id).encode("utf-8"), title.encode('utf-8')))
         if description:
             lines = description.encode('utf-8').splitlines()
-            out.write(b'-- %s\n\n' % '\n-- '.join(lines))
+            out.write(b'-- %s\n\n' % b'\n-- '.join(lines))
         out.write(sql.encode('utf-8'))
         data = out.getvalue()
 
openSUSE Build Service is sponsored by