diff --git a/tools/python/jwutils/Options.py b/tools/python/jwutils/Options.py index 1b19d66..78ce356 100644 --- a/tools/python/jwutils/Options.py +++ b/tools/python/jwutils/Options.py @@ -3,6 +3,7 @@ import json from collections import OrderedDict from .log import * import shlex +import traceback class Options: # export @@ -39,7 +40,12 @@ class Options: # export if r is not None: return r r = cls() - opt_strs = shlex.split(opts_str) + try: + opt_strs = shlex.split(opts_str) + except Exception as e: + slog_m(ERR, traceback.format_exc()) + slog(ERR, 'Failed to split options string >{}<'.format(opts_str)) + raise for opt_str in opt_strs: opt_str = re.sub('\s*=\s*', '=', opt_str) sides = opt_str.split('=')