summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-06 07:37:05 -0700
committerJosh Blum <josh@joshknows.com>2011-04-06 07:37:05 -0700
commit529297b97df9b9d928c30bb7cdb51f14f3fb3ab0 (patch)
tree5472d9cff6c055f9933e0dca065fba2032dd8b8f /host
parent60669a28d8862fd2a8ea324f947580485585b317 (diff)
downloaduhd-529297b97df9b9d928c30bb7cdb51f14f3fb3ab0.tar.gz
uhd-529297b97df9b9d928c30bb7cdb51f14f3fb3ab0.tar.bz2
uhd-529297b97df9b9d928c30bb7cdb51f14f3fb3ab0.zip
usrp2_card_burner: decode byte strings into ascii for parsing
Diffstat (limited to 'host')
-rw-r--r--host/utils/usrp2_card_burner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py
index f24fc4252..741c7e3e1 100644
--- a/host/utils/usrp2_card_burner.py
+++ b/host/utils/usrp2_card_burner.py
@@ -50,7 +50,7 @@ def command(*args):
stderr=subprocess.STDOUT,
)
ret = p.wait()
- verbose = p.stdout.read()
+ verbose = p.stdout.read().decode('ascii')
if ret != 0: raise Exception(verbose)
return verbose
@@ -84,7 +84,7 @@ def get_raw_device_hints():
return info.split(key)[-1].split()[0]
def get_info_list(output):
in_info = False
- for line in str(output).splitlines():
+ for line in output.splitlines():
if line.startswith('\\\\'): in_info = True; info = ''
elif in_info and not line.strip(): in_info = False; yield info
if in_info: info += '\n'+line.strip()
@@ -108,7 +108,7 @@ def get_raw_device_hints():
####################################################################
if platform.system() == 'Linux':
devs = list()
- try: output = open('/proc/partitions', 'r').read()
+ try: output = open('/proc/partitions', 'r').read().decode('ascii')
except: return devs
for line in output.splitlines():
try: