check both imports
This commit is contained in:
parent
726935f77b
commit
ed7188e2ba
@ -27,24 +27,36 @@ limitations under the License.
|
||||
@author R. Mueller
|
||||
"""
|
||||
import sys
|
||||
try:
|
||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
print(error)
|
||||
print('Python tmtccmd submodule could not be imported')
|
||||
print(
|
||||
'Install with \"cd tmtccmd && python3 -m pip '
|
||||
'install -e .[gui]\" for interactive installation'
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import spacepackets
|
||||
from spacepackets.log import set_custom_console_logger_name
|
||||
except ImportError as error:
|
||||
print(error)
|
||||
print('Python spacepackets module could not be imported')
|
||||
print(
|
||||
'Install with \"cd spacepackets && python3 -m pip intall -e .\" for interative installation'
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
from config.hook_implementations import EiveHookObject
|
||||
from config.version import __version__
|
||||
from config.definitions import PUS_APID
|
||||
from pus_tm.factory_hook import ccsds_tm_handler
|
||||
try:
|
||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
|
||||
import spacepackets
|
||||
from spacepackets.log import set_custom_console_logger_name
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
print(error)
|
||||
print("Python tmtccmd submodule could not be imported")
|
||||
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user