diff options
author | Jens Steinhauser <jens.steinhauser@gmail.com> | 2014-10-18 19:58:01 +0200 |
---|---|---|
committer | Jens Steinhauser <jens.steinhauser@gmail.com> | 2014-10-19 22:02:04 +0200 |
commit | cf646afd93e5752fb2f662c7c13df11dd8ab9d73 (patch) | |
tree | c6260b339f5ae8cbb4e9051a84d5ad6b734eb36d | |
parent | f56e9e0f85a9f81abc40a493e5adae02ac75d6da (diff) | |
download | sigrok-test-cf646afd93e5752fb2f662c7c13df11dd8ab9d73.tar.gz sigrok-test-cf646afd93e5752fb2f662c7c13df11dd8ab9d73.zip |
pdtest: Handle unknown command line arguments.
-rwxr-xr-x | decoder/pdtest | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/pdtest b/decoder/pdtest index f9dd140..25dfd83 100755 --- a/decoder/pdtest +++ b/decoder/pdtest @@ -513,7 +513,10 @@ if len(sys.argv) == 1: opt_all = opt_run = opt_show = opt_list = opt_fix = opt_coverage = False report_dir = None -opts, args = getopt(sys.argv[1:], "dvarslfcR:S:") +try: + opts, args = getopt(sys.argv[1:], "dvarslfcR:S:") +except Exception as e: + usage('error while parsing command line arguments: {}'.format(e)) for opt, arg in opts: if opt == '-d': DEBUG += 1 |