(adapter)
return interfaces
Find dvbnet interface(s) of a DVB adapter

    An adapter can have multiple dvbnet interfaces, one for each PID.

    Args:
        adapter: Corresponding DVB adapter

    Returns:
        interfaces : List of dvbnet interfaces
Find dvbnet interface(s) of a DVB adapter
Find dvbnet interface ( s ) of a DVB adapter
def _find_dvbnet_interfaces(adapter):
    """Find dvbnet interface(s) of a DVB adapter

    An adapter can have multiple dvbnet interfaces, one for each PID.

    Args:
        adapter: Corresponding DVB adapter

    Returns:
        interfaces : List of dvbnet interfaces

    """

    util.print_header("Find dvbnet interface(s)")
    cmd = ["dvbnet", "-a", adapter, "-l"]
    logger.debug("> " + " ".join(cmd))
    res = subprocess.check_output(cmd)

    interfaces = list()
    for line in res.splitlines():
        if ("Found device" in line.decode()):
            line_split = line.decode().split()
            interface = {
                'dev': line_split[2][:-1],
                'name': line_split[4][:-1],
                'pid': int(line_split[8][:-1]),
                'encapsulation': line_split[10]
            }
            logger.debug(pformat(interface))
            interfaces.append(interface)

    if (len(interfaces) == 0):
        print("Could not find any dvbnet interface")

    return interfaces
def _find_dvbnet_interfaces ( adapter ) : util . print_header ( "Find dvbnet interface(s)" ) cmd = [ "dvbnet" , "-a" , adapter , "-l" ] logger . debug ( "> " + " " . join ( cmd ) ) res = subprocess . check_output ( cmd ) interfaces = list ( ) for line in res . splitlines ( ) : if ( "Found device" in line . decode ( ) ) : line_split = line . decode ( ) . split ( ) interface = { 'dev' : line_split [ 2 ] [ : - 1 ] , 'name' : line_split [ 4 ] [ : - 1 ] , 'pid' : int ( line_split [ 8 ] [ : - 1 ] ) , 'encapsulation' : line_split [ 10 ] } logger . debug ( pformat ( interface ) ) interfaces . append ( interface ) if ( len ( interfaces ) == 0 ) : print ( "Could not find any dvbnet interface" ) return interfaces