From 620461d8d36324f41f4fa63e89b67ca7a9637118 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 19 Feb 2015 15:02:41 +0100 Subject: Add string vs. binary encoding/decoding for Python3 compatibility --- gbp/command_wrappers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 72dfee5..3e834c6 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -170,12 +170,12 @@ class Command(object): >>> c = Command("/bin/true", capture_stdout=True) >>> c.call(["--version"]) 0 - >>> c.stdout.startswith('true') + >>> c.stdout.decode('utf-8').startswith('true') True >>> c = Command("/bin/false", capture_stdout=True) >>> c.call(["--help"]) 1 - >>> c.stdout.startswith('Usage:') + >>> c.stdout.decode('utf-8').startswith('Usage:') True """ try: -- cgit v1.2.3