Properly handle None

This commit is contained in:
Alex Forencich
2021-03-21 21:03:35 -07:00
parent 5c6510faea
commit a34a1cd125
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ class GmiiFrame:
self.error = [0]*n
def compact(self):
if not any(self.error):
if self.error is not None and not any(self.error):
self.error = None
def handle_tx_complete(self):

View File

@@ -102,7 +102,7 @@ class XgmiiFrame:
self.ctrl = [0]*n
def compact(self):
if not any(self.ctrl):
if self.ctrl is not None and not any(self.ctrl):
self.ctrl = None
def handle_tx_complete(self):