summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-05 20:15:10 -0700
committerJosh Blum <josh@joshknows.com>2011-04-05 20:15:10 -0700
commit60669a28d8862fd2a8ea324f947580485585b317 (patch)
tree439b534c4ab879eec7bdd3dff8ee7b906a3fc29f /host
parent3a588c594717e61b8d23fe5fb018068cc6adb21f (diff)
downloaduhd-60669a28d8862fd2a8ea324f947580485585b317.tar.gz
uhd-60669a28d8862fd2a8ea324f947580485585b317.tar.bz2
uhd-60669a28d8862fd2a8ea324f947580485585b317.zip
usrp2_card_burner: change the padding string to bytes
Diffstat (limited to 'host')
-rw-r--r--host/utils/usrp2_card_burner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py
index cb3cc53f6..f24fc4252 100644
--- a/host/utils/usrp2_card_burner.py
+++ b/host/utils/usrp2_card_burner.py
@@ -179,8 +179,8 @@ def write_image(image_file, device_file, offset):
img_data = open(image_file, 'rb').read()
count = int_ceil_div(len(img_data), SECTOR_SIZE)
pad_len = SECTOR_SIZE*count - len(img_data)
- pad_str = ''.join([chr(0)]*pad_len) #zero-padding
- open(tmp_file, 'wb').write(img_data + pad_str)
+ padding = bytes(b'\x00')*pad_len #zero-padding
+ open(tmp_file, 'wb').write(img_data + padding)
#execute a dd subprocess
verbose = command(