diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-01-03 13:12:27 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-01-11 14:50:12 -0800 |
commit | 1889469efcc5d045defe7eda6b6da06293c73155 (patch) | |
tree | f9d9605ee90bef1e5ca83d6f8e8f9ca84ef21055 /mpm/python/usrp_hwd.py | |
parent | d682a90255af146b6c85d8369fa92b3b934f4cca (diff) | |
download | uhd-1889469efcc5d045defe7eda6b6da06293c73155.tar.gz uhd-1889469efcc5d045defe7eda6b6da06293c73155.tar.bz2 uhd-1889469efcc5d045defe7eda6b6da06293c73155.zip |
mpm: usrp_hwd: Fix logging issue on default_args failure
Failure to provide valid default args no longer results in an
unexpected error.
Also fixed minor formatting issues (PyLint).
Diffstat (limited to 'mpm/python/usrp_hwd.py')
-rwxr-xr-x | mpm/python/usrp_hwd.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py index 4036a1084..e4f64b2f0 100755 --- a/mpm/python/usrp_hwd.py +++ b/mpm/python/usrp_hwd.py @@ -73,16 +73,20 @@ def parse_args(): """ args = setup_arg_parser().parse_args() if args.override_db_pids is not None: - args.override_db_pids = [int(x, 0) for x in args.override_db_pids.split(",")] + args.override_db_pids = [ + int(x, 0) for x in args.override_db_pids.split(",") + ] args.default_args = args.default_args or '' try: args.default_args = { - x.split('=')[0].strip(): x.split('=')[1].strip() if x.find('=') != -1 else '' + x.split('=')[0].strip(): x.split('=')[1].strip() + if x.find('=') != -1 else '' for x in args.default_args.split(',') if len(x) } except IndexError: - log.error("Could not parse default device args: `{}'".format(args.default_args)) + print("Could not parse default device args: `{}'".format( + args.default_args)) return args |