diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-08-18 21:54:52 +0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2019-08-19 22:56:40 +0800 |
commit | 147ae53b68844aa1b088926931f958e30888ffda (patch) | |
tree | dda4f860cfe9d4d5b706dff5e64d016e0fdac1e7 | |
parent | 418124c3322bff0e28f4da76e90940b23060c29f (diff) |
uitest: print useful message when textX is not installed
Change-Id: If6f6c71f72ba9def4885ffbd74cb7814f7465f2c
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py index b77a3449aa6e..210713b4478b 100644 --- a/uitest/ui_logger_dsl/dsl_core.py +++ b/uitest/ui_logger_dsl/dsl_core.py @@ -10,7 +10,12 @@ import os import sys import argparse import keyword -from textx.metamodel import metamodel_from_file +try: + from textx.metamodel import metamodel_from_file +except ImportError: + print("textx is a required package.") + print("Please install the package for example with \"pip3 install --user textx\"") + sys.exit(1) tab=" " double_tab=" " @@ -573,4 +578,4 @@ def main(): del ui_logger if __name__ == '__main__': - main()
\ No newline at end of file + main() |