1 |
commit: 328650032448425d64ec186fe24d84930f95d037 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 12 03:28:59 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 28 16:49:56 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=32865003 |
7 |
|
8 |
hash_utils: decode output of popen |
9 |
|
10 |
In py3, the return of popen is binary data. We need |
11 |
to decode it to get a string we can work with. |
12 |
|
13 |
catalyst/hash_utils.py | 2 +- |
14 |
1 file changed, 1 insertion(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/catalyst/hash_utils.py b/catalyst/hash_utils.py |
17 |
index 1161da3..6e08967 100644 |
18 |
--- a/catalyst/hash_utils.py |
19 |
+++ b/catalyst/hash_utils.py |
20 |
@@ -117,7 +117,7 @@ class HashMap(object): |
21 |
log.debug('args = %r', args) |
22 |
source = Popen(args, stdout=PIPE) |
23 |
output = source.communicate() |
24 |
- lines = output[0].split('\n') |
25 |
+ lines = output[0].decode('ascii').split('\n') |
26 |
log.debug('output = %s', output) |
27 |
header = lines[0] |
28 |
h_f = lines[1].split() |