Revision b47cdfea mininet/moduledeps.py

View differences:

mininet/moduledeps.py
2 2

  
3 3
from mininet.util import quietRun
4 4
from mininet.log import info, error, debug
5
from os import environ
5 6

  
6 7
def lsmod():
7 8
    "Return output of lsmod."
......
54 55
                exit( 1 )
55 56
        else:
56 57
            debug( '*** ' + mod + ' already loaded\n' )
58

  
59
def pathCheck( *args ):
60
    "Make sure each program in *args can be found in $PATH."
61
    for arg in args:
62
        if not quietRun( 'which ' + arg ):
63
            error( 'Cannot find required executable %s -'
64
                ' is it installed somewhere in your $PATH?\n(%s)\n' %
65
                    ( arg, environ[ 'PATH' ] ) )
66
            exit( 1 )

Also available in: Unified diff