Merge branch 'testing' into experimental

pull/164/head
Mark Jessop 2019-03-09 20:58:53 +10:30
commit a1cd87330f
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -207,11 +207,12 @@ def detect_sonde(frequency, rs_path="./", dwell_time=10, sdr_fm='rtl_fm', device
_start = time.time()
ret_output = subprocess.check_output(rx_test_command, shell=True, stderr=FNULL)
FNULL.close()
ret_output = ret_output.decode('utf8')
except subprocess.CalledProcessError as e:
# dft_detect returns a code of 1 if no sonde is detected.
# logging.debug("Scanner - dfm_detect return code: %s" % e.returncode)
if e.returncode >= 2:
ret_output = e.output
ret_output = e.output.decode('utf8')
else:
_runtime = time.time() - _start
logging.debug("Scanner - dft_detect exited in %.1f seconds." % _runtime)

Wyświetl plik

@ -341,6 +341,8 @@ def lsusb():
FNULL = open(os.devnull, 'w')
lsusb_raw_output = subprocess.check_output(['lsusb', '-v'], stderr=FNULL)
FNULL.close()
# Convert from bytes.
lsusb_raw_output = lsusb_raw_output.decode('utf8')
except Exception as e:
logging.error("lsusb parse error - %s" % str(e))
return