Merge pull request #55 from thefinn93/search-path-for-grgsm

Use distutils.spawn.find_executable to find grgsm_scanner
This commit is contained in:
Oros 2018-08-02 20:31:58 +02:00 committed by GitHub
commit 502ff322b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,9 +18,11 @@ import imp
from optparse import OptionParser
import subprocess
import sys
import distutils.spawn
def find_gsm_bases():
scanner = imp.load_source('scanner', '/usr/bin/grgsm_scanner')
grgsm_scanner_path = distutils.spawn.find_executable("grgsm_scanner")
scanner = imp.load_source('scanner', grgsm_scanner_path)
sys.modules['scanner'] = scanner
(options, args) = scanner.argument_parser().parse_args()
list = scanner.do_scan(options.samp_rate, options.band, options.speed,