daemon/core/emane/emane.py
def detectversionfromcmd(cls):
        ''' Runs 'emane --version' locally to determine version number.
        '''
        # for further study: different EMANE versions on distributed machines
        try:
            # TODO: fix BUG here -- killall may kill this process too
            status, result = cmdresult(['emane', '--version'])
        except OSError:
            status = -1
            result = ""
        v = cls.EMANEUNK
        if status == 0:
            if result[:5] == "0.7.4":
                v = cls.EMANE074
            elif result[:5] == "0.8.1":
                v = cls.EMANE081
            elif result[:5] == "0.9.1":
                v = cls.EMANE091
            elif result[:5] == "0.9.2":
                v = cls.EMANE092
        return v, result.strip()
 Runs 'emane --version' locally to determine version number.
        
Runs 'emane --version' locally to determine version number.
Runs ' emane -- version ' locally to determine version number .
def detectversionfromcmd(cls):
        try:
            status, result = cmdresult(['emane', '--version'])
        except OSError:
            status = -1
            result = ""
        v = cls.EMANEUNK
        if status == 0:
            if result[:5] == "0.7.4":
                v = cls.EMANE074
            elif result[:5] == "0.8.1":
                v = cls.EMANE081
            elif result[:5] == "0.9.1":
                v = cls.EMANE091
            elif result[:5] == "0.9.2":
                v = cls.EMANE092
        return v, result.strip()
def detectversionfromcmd ( cls ) : try : status , result = cmdresult ( [ 'emane' , '--version' ] ) except OSError : status = - 1 result = "" v = cls . EMANEUNK if status == 0 : if result [ : 5 ] == "0.7.4" : v = cls . EMANE074 elif result [ : 5 ] == "0.8.1" : v = cls . EMANE081 elif result [ : 5 ] == "0.9.1" : v = cls . EMANE091 elif result [ : 5 ] == "0.9.2" : v = cls . EMANE092 return v , result . strip ( )
Runs 'emane --version' locally to determine version number.
Runs ' emane -- version ' locally to determine version number .
''' Runs 'emane --version' locally to determine version number.
        ''' # for further study: different EMANE versions on distributed machines # TODO: fix BUG here -- killall may kill this process too
cls