def get_devices(self):

        """List all connected devices"""

        self.__run_command("devices")

        device_list = list()

        try:
            output = self.get_output()[0].split('\n')
        except __HOLE__:
            return device_list

        # Remove the "List of devices..."
        output.pop(0)

        # ...Also the two '' at the end.
        output.pop()
        output.pop()

        if len(output) == 0:
            return device_list

        for device in output:

            try:
                serial, device_type = device.split('\t')
            except ValueError:
                continue

            device_list.append({'serial' : serial, 'type' : device_type})

        return device_list
dataset/ETHPy150Open jakev/dtf/src/dtf/adb.py/DtfAdb.get_devices