Commit afa30136 authored by Mattia Rizzolo's avatar Mattia Rizzolo

fix pep8 E127

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent a07b6d89
......@@ -92,9 +92,9 @@ CBFS_MAXIMUM_FILE_SIZE = 24 * 2 ** 20 # 24 MiB
def is_header_valid(buf, size, offset=0):
magic, version, romsize, bootblocksize, align, cbfs_offset, architecture, pad = struct.unpack_from('!IIIIIIII', buf, offset)
return magic == CBFS_HEADER_MAGIC and \
(version == CBFS_HEADER_VERSION1 or version == CBFS_HEADER_VERSION2) and \
(romsize <= size) and \
(cbfs_offset < romsize)
(version == CBFS_HEADER_VERSION1 or version == CBFS_HEADER_VERSION2) and \
(romsize <= size) and \
(cbfs_offset < romsize)
class CbfsFile(File):
......
......@@ -55,8 +55,8 @@ def parse_entries(f):
pos = f.tell()
x['ctime'], x['ctime_nano'], x['mtime'], x['mtime_nano'], \
x['dev'], x['inode'], x['mode'], x['uid'], x['gid'], \
x['size'], x['sha'], x['flags'] = \
x['dev'], x['inode'], x['mode'], x['uid'], x['gid'], \
x['size'], x['sha'], x['flags'] = \
struct.unpack('>LLLLLLLLLL20sH', f.read((4 * 10) + 20 + 2))
x['path'] = f.read(x['flags'] & 0x0fff)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment