diff --git a/owrx/feature.py b/owrx/feature.py index 00932df..5404ac8 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -221,15 +221,18 @@ class FeatureDetector(object): return self._check_connector("soapy_connector") def _has_soapy_driver(self, driver): - process = subprocess.Popen(["SoapySDRUtil", "--info"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) - driverRegex = re.compile("^Module found: .*lib(.*)Support.so") + try: + process = subprocess.Popen(["SoapySDRUtil", "--info"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) + driverRegex = re.compile("^Module found: .*lib(.*)Support.so") - def matchLine(line): - matches = driverRegex.match(line.decode()) - return matches is not None and matches.group(1) == driver + def matchLine(line): + matches = driverRegex.match(line.decode()) + return matches is not None and matches.group(1) == driver - lines = [matchLine(line) for line in process.stdout] - return reduce(or_, lines, False) + lines = [matchLine(line) for line in process.stdout] + return reduce(or_, lines, False) + except FileNotFoundError: + return False def has_soapy_sdrplay(self): """