diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-05 20:15:10 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-05 20:15:10 -0700 |
commit | 60669a28d8862fd2a8ea324f947580485585b317 (patch) | |
tree | 439b534c4ab879eec7bdd3dff8ee7b906a3fc29f | |
parent | 3a588c594717e61b8d23fe5fb018068cc6adb21f (diff) | |
download | uhd-60669a28d8862fd2a8ea324f947580485585b317.tar.gz uhd-60669a28d8862fd2a8ea324f947580485585b317.tar.bz2 uhd-60669a28d8862fd2a8ea324f947580485585b317.zip |
usrp2_card_burner: change the padding string to bytes
-rw-r--r-- | host/utils/usrp2_card_burner.py | 4 |
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( |