handle soapy not being installed at all, references #42
This commit is contained in:
parent
9c82a80273
commit
092a2e5ca0
@ -221,15 +221,18 @@ class FeatureDetector(object):
|
|||||||
return self._check_connector("soapy_connector")
|
return self._check_connector("soapy_connector")
|
||||||
|
|
||||||
def _has_soapy_driver(self, driver):
|
def _has_soapy_driver(self, driver):
|
||||||
process = subprocess.Popen(["SoapySDRUtil", "--info"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
try:
|
||||||
driverRegex = re.compile("^Module found: .*lib(.*)Support.so")
|
process = subprocess.Popen(["SoapySDRUtil", "--info"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||||
|
driverRegex = re.compile("^Module found: .*lib(.*)Support.so")
|
||||||
|
|
||||||
def matchLine(line):
|
def matchLine(line):
|
||||||
matches = driverRegex.match(line.decode())
|
matches = driverRegex.match(line.decode())
|
||||||
return matches is not None and matches.group(1) == driver
|
return matches is not None and matches.group(1) == driver
|
||||||
|
|
||||||
lines = [matchLine(line) for line in process.stdout]
|
lines = [matchLine(line) for line in process.stdout]
|
||||||
return reduce(or_, lines, False)
|
return reduce(or_, lines, False)
|
||||||
|
except FileNotFoundError:
|
||||||
|
return False
|
||||||
|
|
||||||
def has_soapy_sdrplay(self):
|
def has_soapy_sdrplay(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user