Added error handling for when a webserver is already running when starting or re-starting the app.

This commit is contained in:
Justin Emter
2017-08-17 06:56:35 -07:00
parent bea4b4286b
commit 1fc3d1bf7a

View File

@@ -9,6 +9,7 @@ import thread,SocketServer,SimpleHTTPServer
from yattag import Doc
from yattag import indent
import os, sys
import socket
import logging
import logging.handlers
@@ -112,6 +113,9 @@ class PseudoDailyScheduleController():
core.print_info("Exiting the SET web server...")
httpd.socket.close()
except socket.error, exc:
print "Caught exception socket.error : %s" % exc
# handle the rest
#except Exception:
# print "[*] Exiting the SET web server...\n"