coala / coala-html

Interactive website generator using results from coala
GNU Affero General Public License v3.0
17 stars 40 forks source link

Catch KeyboardInterrupt once and for all #80

Open tushar-rishav opened 8 years ago

tushar-rishav commented 8 years ago

Look https://asciinema.org/a/3x8x364ufuanlhghc6p6fby0k It'd be nice to catch the exceptions that arise and are caught by webbrowser. Not sure how to do this.

gitmate-bot commented 8 years ago

Thanks for reporting this issue!

@coala-analyzer/coala-contributors, your aid is required, fellow coalaian. Help us triage and solving this issue!

Redridge commented 8 years ago

Basically the port remains suspended? I have used something like this in a previous project, maybe it helps. Though it is not platform independent :(

import signal, sys

def signal_handler(signum, frame):
  print ("Exiting...")
  sys.exit(0)

# main somewhere here
signal.signal(signal.SIGINT, signal_handler)