projects
/
tools
/
bmap-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
758d27d
)
BmapCopy.py: fix incorrect assignment
author
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Tue, 20 Nov 2012 09:11:24 +0000
(11:11 +0200)
committer
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Tue, 20 Nov 2012 14:55:20 +0000
(16:55 +0200)
This patch fixes the following bug:
UnboundLocalError: local variable 'last' referenced before assignment
which happens when the range consists only of one block.
Change-Id: I4d91d2abdd45408b6d2a6131e3ddd7fbbe3492f9
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCopy.py
patch
|
blob
|
history
diff --git
a/bmaptools/BmapCopy.py
b/bmaptools/BmapCopy.py
index
3b16a84
..
59aa2d2
100644
(file)
--- a/
bmaptools/BmapCopy.py
+++ b/
bmaptools/BmapCopy.py
@@
-301,7
+301,7
@@
class BmapCopy:
if first > last:
raise Error("bad range (first > last): '%s'" % blocks_range)
else:
-
first = la
st
+
last = fir
st
if 'sha1' in xml_element.attrib:
sha1 = xml_element.attrib['sha1']