From: Plamen Dimitrov Date: Fri, 25 Jan 2019 17:31:40 +0000 (+0200) Subject: Fix cnfvar case of writing bytes from the io module X-Git-Tag: v1.4~5^2~2 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=ce9ef23cb6f9939d005ea536204e2d25f1aae595;p=pyi2ncommon Fix cnfvar case of writing bytes from the io module --- diff --git a/src/cnfvar.py b/src/cnfvar.py index a05fe0e..5999ba6 100644 --- a/src/cnfvar.py +++ b/src/cnfvar.py @@ -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()