blockimgdiff.py: Fix the script error for BBOTA v1.

CL in [1] added an assertion to make sure an empty RangeSet cannot call
RangeSet.to_raw_string(). However, we may unintentionally hit that when
generating BBOTA v1 script (e.g. for "new" commands that always have
empty src_ranges).

[1] commit e8f756137c

Change-Id: I1723606967f354ace9286d2b888fdbc80ba10e39
This commit is contained in:
Tao Bao
2015-10-21 13:36:01 -07:00
parent c5a33b0570
commit 4fcb77e4e3

View File

@@ -355,7 +355,7 @@ class BlockImageDiff(object):
free_string = []
if self.version == 1:
src_str = xf.src_ranges.to_string_raw()
src_str = xf.src_ranges.to_string_raw() if xf.src_ranges else ""
elif self.version >= 2:
# <# blocks> <src ranges>