mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
dtoc: Convert the Fdt.Prop class to Python 3
Update this class to work correctly on Python 3 and to pass its unit tests. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f6b64815dd
commit
928527f686
1 changed files with 4 additions and 4 deletions
|
@ -98,18 +98,18 @@ class Prop:
|
|||
bytes
|
||||
type: Value type
|
||||
"""
|
||||
def __init__(self, node, offset, name, bytes):
|
||||
def __init__(self, node, offset, name, data):
|
||||
self._node = node
|
||||
self._offset = offset
|
||||
self.name = name
|
||||
self.value = None
|
||||
self.bytes = str(bytes)
|
||||
self.bytes = bytes(data)
|
||||
self.dirty = False
|
||||
if not bytes:
|
||||
if not data:
|
||||
self.type = TYPE_BOOL
|
||||
self.value = True
|
||||
return
|
||||
self.type, self.value = BytesToValue(bytes)
|
||||
self.type, self.value = BytesToValue(bytes(data))
|
||||
|
||||
def RefreshOffset(self, poffset):
|
||||
self._offset = poffset
|
||||
|
|
Loading…
Add table
Reference in a new issue