rtslib/utils.py
def modprobe(module):
    '''
    Load the specified kernel module if needed.
    @param module: The name of the kernel module to be loaded.
    @type module: str
    '''
    if module in list_loaded_kernel_modules():
        return

    try:
        import kmod
    except ImportError:
        process = subprocess.Popen(("modprobe", module),
                                   stdout=subprocess.PIPE,
                                   stderr=subprocess.PIPE)
        (stdoutdata, stderrdata) = process.communicate()
        if process.returncode != 0:
            raise RTSLibError(stderrdata)
        return

    try:
        kmod.Kmod().modprobe(module)
    except kmod.error.KmodError:
        raise RTSLibError("Could not load module: %s" % module)

    Load the specified kernel module if needed.
    @param module: The name of the kernel module to be loaded.
    @type module: str
    
Load the specified kernel module if needed.
Load the specified kernel module if needed .
def modprobe(module):
    if module in list_loaded_kernel_modules():
        return
    try:
        import kmod
    except ImportError:
        process = subprocess.Popen(("modprobe", module),
                                   stdout=subprocess.PIPE,
                                   stderr=subprocess.PIPE)
        (stdoutdata, stderrdata) = process.communicate()
        if process.returncode != 0:
            raise RTSLibError(stderrdata)
        return
    try:
        kmod.Kmod().modprobe(module)
    except kmod.error.KmodError:
        raise RTSLibError("Could not load module: %s" % module)
def modprobe ( module ) : if module in list_loaded_kernel_modules ( ) : return try : import kmod except ImportError : process = subprocess . Popen ( ( "modprobe" , module ) , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( stdoutdata , stderrdata ) = process . communicate ( ) if process . returncode != 0 : raise RTSLibError ( stderrdata ) return try : kmod . Kmod ( ) . modprobe ( module ) except kmod . error . KmodError : raise RTSLibError ( "Could not load module: %s" % module )
Load the specified kernel module if needed.
Load the specified kernel module if needed .
'''
    Load the specified kernel module if needed.
    @param module: The name of the kernel module to be loaded.
    @type module: str
    '''
module
The name of the kernel module to be loaded.
The name of the kernel module to be loaded .