forked from OERV-BSP/u-boot
binman: Tidy up pylint warnings in comp_util
Tweak some naming and comments to resolve these. Use WriteFile() to write the file. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -241,9 +241,9 @@ class CbfsFile(object):
|
||||
"""Handle decompressing data if necessary"""
|
||||
indata = self.data
|
||||
if self.compress == COMPRESS_LZ4:
|
||||
data = comp_util.Decompress(indata, 'lz4', with_header=False)
|
||||
data = comp_util.decompress(indata, 'lz4', with_header=False)
|
||||
elif self.compress == COMPRESS_LZMA:
|
||||
data = comp_util.Decompress(indata, 'lzma', with_header=False)
|
||||
data = comp_util.decompress(indata, 'lzma', with_header=False)
|
||||
else:
|
||||
data = indata
|
||||
self.memlen = len(data)
|
||||
@@ -362,9 +362,9 @@ class CbfsFile(object):
|
||||
elif self.ftype == TYPE_RAW:
|
||||
orig_data = data
|
||||
if self.compress == COMPRESS_LZ4:
|
||||
data = comp_util.Compress(orig_data, 'lz4', with_header=False)
|
||||
data = comp_util.compress(orig_data, 'lz4', with_header=False)
|
||||
elif self.compress == COMPRESS_LZMA:
|
||||
data = comp_util.Compress(orig_data, 'lzma', with_header=False)
|
||||
data = comp_util.compress(orig_data, 'lzma', with_header=False)
|
||||
self.memlen = len(orig_data)
|
||||
self.data_len = len(data)
|
||||
attr = struct.pack(ATTR_COMPRESSION_FORMAT,
|
||||
|
||||
Reference in New Issue
Block a user