def _get_device_id(self, bus):
_dbus = bus.get(SERVICE_BUS, PATH)<EOL>devices = _dbus.devices()<EOL>if self.device is None and self.device_id is None and len(devices) == <NUM_LIT:1>:<EOL><INDENT>return devices[<NUM_LIT:0>]<EOL><DEDENT>for id in devices:<EOL><INDENT>self._dev = bus.get(SERVICE_BUS, DEVICE_PATH + "<STR_LIT>" % id)<EOL>if self.device == self._dev.name:<EOL><INDENT>return id<EOL><DEDENT><DEDENT>return None<EOL>
Find the device id