aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_hwd.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-03 13:12:27 -0800
committerMartin Braun <martin.braun@ettus.com>2018-01-11 14:50:12 -0800
commit1889469efcc5d045defe7eda6b6da06293c73155 (patch)
treef9d9605ee90bef1e5ca83d6f8e8f9ca84ef21055 /mpm/python/usrp_hwd.py
parentd682a90255af146b6c85d8369fa92b3b934f4cca (diff)
downloaduhd-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-xmpm/python/usrp_hwd.py10
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