Skip to content

Commit

Permalink
Decode output of subprocess.Popen
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Mar 10, 2015
1 parent 87cb212 commit 3833087
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions catkin_tools/verbs/catkin_build/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ def get_multiarch(self):
['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
# be sure of returning empty string or a valid multiarch tuple format
assert(not out.strip() or out.strip().count('-') == 2)
return out.strip()
decoded = out.decode('utf-8').strip()
assert(not decoded or decoded.count('-') == 2)
return decoded

def get_commands(self):
commands = []
Expand Down

0 comments on commit 3833087

Please sign in to comment.