From 60669a28d8862fd2a8ea324f947580485585b317 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 5 Apr 2011 20:15:10 -0700 Subject: usrp2_card_burner: change the padding string to bytes --- host/utils/usrp2_card_burner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host') 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( -- cgit v1.2.3