From 1889469efcc5d045defe7eda6b6da06293c73155 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 3 Jan 2018 13:12:27 -0800 Subject: 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). --- mpm/python/usrp_hwd.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mpm/python/usrp_hwd.py') 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 -- cgit v1.2.3