mirror of
https://github.com/rscmbbng/Border-Check.git
synced 2024-12-25 21:41:28 +01:00
thread liberation after KeyboardInterrupt on main
This commit is contained in:
parent
7a7e14bdeb
commit
37530ccdd1
9
main.py
9
main.py
@ -507,11 +507,12 @@ class bc(object):
|
|||||||
# start web mode (on a different thread)
|
# start web mode (on a different thread)
|
||||||
try:
|
try:
|
||||||
t = threading.Thread(target=BorderCheckWebserver, args=(self, ))
|
t = threading.Thread(target=BorderCheckWebserver, args=(self, ))
|
||||||
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
except:
|
except (KeyboardInterrupt, SystemExit):
|
||||||
print "Error: unable to start thread"
|
t.join()
|
||||||
pass
|
sys.exit()
|
||||||
# open same browser of history access on a new tab
|
# open same browser of history access on a new tab
|
||||||
try:
|
try:
|
||||||
webbrowser.open('http://127.0.0.1:8080', new=1)
|
webbrowser.open('http://127.0.0.1:8080', new=1)
|
||||||
@ -537,6 +538,8 @@ class bc(object):
|
|||||||
open('data.xml', 'w') # starting a new xml data container in write mode
|
open('data.xml', 'w') # starting a new xml data container in write mode
|
||||||
traces = self.try_running(self.traces, "\nInternal error tracerouting.")
|
traces = self.try_running(self.traces, "\nInternal error tracerouting.")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
#if KeyboardInterrupt:
|
||||||
|
# break
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = bc()
|
app = bc()
|
||||||
|
Loading…
Reference in New Issue
Block a user