diff options
author | Brennan Ashton <bashton@brennanashton.com> | 2018-11-14 17:53:22 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-11-15 15:44:05 -0800 |
commit | 2f66412afaca4a42319c666958c89827edd8f2f3 (patch) | |
tree | f82482c09d4885fcd8b1a279484d5770767a32aa /gnuradio-runtime/python/gnuradio/eng_arg.py | |
parent | 39b74849d939456a0d1e4aa534e9f829e742ba63 (diff) |
gr-runtime: Improve exception handling in ControlPort Monitor
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/eng_arg.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/eng_arg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/python/gnuradio/eng_arg.py b/gnuradio-runtime/python/gnuradio/eng_arg.py index 5983352443..f620e34b1f 100644 --- a/gnuradio-runtime/python/gnuradio/eng_arg.py +++ b/gnuradio-runtime/python/gnuradio/eng_arg.py @@ -34,7 +34,7 @@ def intx(string): """ try: return int(string, 0) - except: + except (ValueError, TypeError): raise argparse.ArgumentTypeError( "Invalid integer value: {}".format(string) ) @@ -47,7 +47,7 @@ def eng_float(string): """ try: return eng_notation.str_to_num(string) - except: + except (TypeError, ValueError): raise argparse.ArgumentTypeError( "Invalid engineering notation value: {}".format(string) ) |