python2 fix, ctrl+c now exits app, useless javascript console message removed
This commit is contained in:
@@ -37,10 +37,15 @@ import pdb
|
||||
import asyncore
|
||||
import multiprocessing
|
||||
import dl
|
||||
import signal
|
||||
|
||||
import code
|
||||
import traceback
|
||||
|
||||
def handle_signal(signal, frame):
|
||||
log.info("Ctrl+C: aborting.")
|
||||
os._exit(1) #not too graceful exit
|
||||
|
||||
def ip_match(this,ip_ranges,for_allow):
|
||||
if not len(ip_ranges):
|
||||
return 1 #empty list matches all ip addresses
|
||||
@@ -445,6 +450,9 @@ def main():
|
||||
global rtl_tcp_core
|
||||
global sample_rate
|
||||
|
||||
#Set signal handler
|
||||
signal.signal(signal.SIGINT, handle_signal) #http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python
|
||||
|
||||
# set up logging
|
||||
log = logging.getLogger("rtl_mus")
|
||||
log.setLevel(logging.DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user