From 6b7b88102a1a8be1e8deaa1e63dc9ede4b5131b7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 9 May 2016 10:14:17 -0700 Subject: devtest: Fix $PATH-setting code PATH was only set for the examples, but not for the initial call to uhd_find_devices. This reverts commit b7c296f58399f0ef1fee7b3ef3d7da957f551558, which tried to fix this but did so badly, and also amends it with the correct fix. --- host/tests/devtest/usrp_probe.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/tests/devtest/usrp_probe.py') diff --git a/host/tests/devtest/usrp_probe.py b/host/tests/devtest/usrp_probe.py index c734f48a1..50d484518 100644 --- a/host/tests/devtest/usrp_probe.py +++ b/host/tests/devtest/usrp_probe.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2015 Ettus Research LLC +# Copyright 2015-2016 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,13 +20,13 @@ import re import subprocess -def get_usrp_list(device_filter=None): +def get_usrp_list(device_filter=None, env=None): """ Returns a list of dicts that contain USRP info """ try: + cmd = ['uhd_find_devices'] if device_filter is not None: - output = subprocess.check_output(['../../utils/uhd_find_devices', '--args', device_filter]) - else: - output = subprocess.check_output('../../utils/uhd_find_devices') + cmd += ['--args', device_filter] + output = subprocess.check_output(cmd, env=env) except subprocess.CalledProcessError: return [] split_re = "\n*-+\n-- .*\n-+\n" -- cgit v1.2.3