mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
m1n1.utils.RegAccessor: Pass through None when register is unavailable
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
d942984b72
commit
83b05e7743
1 changed files with 4 additions and 1 deletions
|
@ -614,7 +614,10 @@ class RegAccessor(Reloadable):
|
|||
|
||||
@property
|
||||
def reg(self):
|
||||
return self.cls(self.val)
|
||||
val = self.val
|
||||
if val is None:
|
||||
return None
|
||||
return self.cls(val)
|
||||
|
||||
@reg.setter
|
||||
def reg(self, value):
|
||||
|
|
Loading…
Add table
Reference in a new issue