python2 fix, ctrl+c now exits app, useless javascript console message removed

This commit is contained in:
ha7ilm
2014-11-30 12:21:19 +01:00
parent 668d9d0dcf
commit 15ada52bfa
3 changed files with 21 additions and 5 deletions

View File

@@ -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)