mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 05:43:02 +02:00
probe: Fix crash on systems without USB
While __get_phandle_array returns the empty set when the property is not available, str_array would return None, unless instructed otherwise. Make sure that it also returns the empty set.
This commit is contained in:
@@ -83,7 +83,7 @@ class DTSystem:
|
||||
}
|
||||
|
||||
def infix_usb_devices(self, out):
|
||||
names=self.infix.str_array("usb-port-names")
|
||||
names=self.infix.str_array("usb-port-names", ())
|
||||
phs=self.__get_phandle_array("usb-ports")
|
||||
data=dict(zip(names,phs))
|
||||
if data != {}:
|
||||
|
||||
Reference in New Issue
Block a user