From 9455ae3934366f7dcd2586c284d413d6756856a8 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 19 Feb 2015 12:43:24 +0100 Subject: Add string vs. binary encoding/decoding for Python3 compatibility --- gbp/deb/format.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gbp/deb/format.py b/gbp/deb/format.py index a91f8c7..cdfa746 100644 --- a/gbp/deb/format.py +++ b/gbp/deb/format.py @@ -82,9 +82,10 @@ class DebianSourceFormat(object): @returns: a debisn/source/format object @rtype: L{DebianSourceFormat} + >>> from six import b >>> import tempfile, os >>> with tempfile.NamedTemporaryFile(delete=False) as t: - ... ret = t.write("3.0 (quilt)") + ... ret = t.write(b("3.0 (quilt)")) >>> d = DebianSourceFormat.parse_file(t.name) >>> d.version '3.0' -- cgit v1.2.3