modifié: m/fichier/conf
modifié: m/loadConf.py modifié: superTornado.py
This commit is contained in:
parent
dd1efef7be
commit
f7c902dddb
@ -1,3 +1,3 @@
|
|||||||
blind=1
|
|
||||||
camera=192.168.1.13
|
camera=192.168.1.13
|
||||||
port=80
|
port=80
|
||||||
|
@ -19,7 +19,6 @@ class LoadConf(object):
|
|||||||
return rep
|
return rep
|
||||||
|
|
||||||
def ipCamera(self) :
|
def ipCamera(self) :
|
||||||
print self.loadValue("camera")
|
|
||||||
return self.loadValue("camera")
|
return self.loadValue("camera")
|
||||||
|
|
||||||
def portServ(self) :
|
def portServ(self) :
|
||||||
|
@ -165,10 +165,10 @@ if __name__ == "__main__":
|
|||||||
if port == "error" :
|
if port == "error" :
|
||||||
raise "Failed Load Port Server Configuration"
|
raise "Failed Load Port Server Configuration"
|
||||||
except Exception, e :
|
except Exception, e :
|
||||||
print "Configuration Loading Failed ! Check Configuration File !"
|
print bcolors.WARNING + "Configuration Loading Failed ! Check Configuration File !" + bcolors.ENDC
|
||||||
print e
|
print e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print "->Configuration Server Load Successfully:"
|
print "->Configuration Server Load Successfully :"
|
||||||
if blind == True:
|
if blind == True:
|
||||||
print " ->Blind unhabitant"
|
print " ->Blind unhabitant"
|
||||||
else :
|
else :
|
||||||
@ -181,6 +181,7 @@ if __name__ == "__main__":
|
|||||||
print("->Server Start ...")
|
print("->Server Start ...")
|
||||||
http_server = tornado.httpserver.HTTPServer(application)
|
http_server = tornado.httpserver.HTTPServer(application)
|
||||||
http_server.listen(port)
|
http_server.listen(port)
|
||||||
|
print "->Server Start Successfully !"
|
||||||
tornado.ioloop.IOLoop.instance().start()
|
tornado.ioloop.IOLoop.instance().start()
|
||||||
except Exception, e :
|
except Exception, e :
|
||||||
print "Server Start Failed !"
|
print "Server Start Failed !"
|
||||||
|
Reference in New Issue
Block a user