modifié: m/loadConf.py

modifié:         superTornado.py
This commit is contained in:
sidya82 2014-03-02 23:24:54 +01:00
parent eea71d3b78
commit ae9bbb738c
2 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,8 @@ class LoadConf(object):
return rep return rep
def ipCamera(self) : def ipCamera(self) :
return loadValue("camera") print self.loadValue("camera")
return self.loadValue("camera")
def portServ(self) : def portServ(self) :
return loadValue("port") return self.loadValue("port")

View File

@ -21,7 +21,7 @@ import os
config = LoadConf() config = LoadConf()
blind = False blind = False
cam = "" camera = ""
port ="" port =""
ficLog = Log() ficLog = Log()
@ -156,11 +156,11 @@ if __name__ == "__main__":
print "->Loading configuration ... " print "->Loading configuration ... "
try : try :
blind = config.isBlind blind = config.isBlind
cam = config.ipCamera camera = config.ipCamera
port = config.portServ port = config.portServ
if blind == "error" : if blind == "error" :
raise "Failed Load Blind Configuration" raise "Failed Load Blind Configuration"
if cam == "error" : if camera == "error" :
raise "Failed Load IP Camera Configuration" raise "Failed Load IP Camera Configuration"
if port == "error" : if port == "error" :
raise "Failed Load Port Server Configuration" raise "Failed Load Port Server Configuration"
@ -173,7 +173,7 @@ if __name__ == "__main__":
print " ->Blind unhabitant" print " ->Blind unhabitant"
else : else :
print " ->Not blind unhabitant" print " ->Not blind unhabitant"
print " ->Ip camera : " + cam print " ->Ip camera : " + camera
print " ->Port Server : " + port print " ->Port Server : " + port
tornado.options.parse_command_line() tornado.options.parse_command_line()