summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-02-19 15:02:41 +0100
committerGuido Günther <agx@sigxcpu.org>2015-03-27 15:40:26 +0100
commit620461d8d36324f41f4fa63e89b67ca7a9637118 (patch)
tree5edb138145c7381de8d5752ebfcd1bd84c4eab06
parent6cd275704f8e4d53389378eaa7d5dcff33a72369 (diff)
Add string vs. binary encoding/decoding
for Python3 compatibility
-rw-r--r--gbp/command_wrappers.py4
1 files 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: