aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass2019-07-08 14:25:33 -0600
committerSimon Glass2019-07-24 12:54:08 -0700
commit5b463fc26ea5a932d40845ec4eac6ff7e968756f (patch)
treede02aaff870a52b35779f6f2ce2c1b25bc816279 /tools/binman/entry.py
parente430440232e455c0b670a3f5647fbab649e34f4b (diff)
binman: Fix up ProcessUpdateContents error and comments
This function raises an exception with its arguments around the wrong way so the message is incorrect. Fix this as well as a few minor comment problems. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index a04e149d96c..b19a3b026f2 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -237,25 +237,25 @@ class Entry(object):
This sets both the data and content_size properties
Args:
- data: Data to set to the contents (string)
+ data: Data to set to the contents (bytes)
"""
self.data = data
self.contents_size = len(self.data)
def ProcessContentsUpdate(self, data):
- """Update the contens of an entry, after the size is fixed
+ """Update the contents of an entry, after the size is fixed
This checks that the new data is the same size as the old.
Args:
- data: Data to set to the contents (string)
+ data: Data to set to the contents (bytes)
Raises:
ValueError if the new data size is not the same as the old
"""
if len(data) != self.contents_size:
self.Raise('Cannot update entry size from %d to %d' %
- (len(data), self.contents_size))
+ (self.contents_size, len(data)))
self.SetContents(data)
def ObtainContents(self):