Fix cnfvar case of writing bytes from the io module
authorPlamen Dimitrov <pdimitrov@pevogam.com>
Fri, 25 Jan 2019 17:31:40 +0000 (19:31 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Feb 2019 15:50:39 +0000 (16:50 +0100)
src/cnfvar.py

index a05fe0e..5999ba6 100644 (file)
@@ -749,7 +749,7 @@ def dump_cnf_string(root, renumber=False):
     string.
     """
     cnf = cnf_root(root)
-    out = io.StringIO()
+    out = io.BytesIO()
     output_cnf(root, out, renumber=renumber, bytes=False)
     res = out.getvalue()
     out.close()