Use distutils.spawn.find_executable to find grgsm_scanner, rather than hard-coding the path
It's not always installed in /usr/bin/grgsm_scanner
This commit is contained in:
parent
87ec590210
commit
7cc1a7423d
1 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue