Subversion Repositories SmartDukaan

Rev

Rev 304 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 304 Rev 418
Line 47... Line 47...
47
        self.p = subprocess.Popen(args)
47
        self.p = subprocess.Popen(args)
48
        
48
        
49
        self.socket = TSocket.TSocket(host='localhost', port=int(self.local_port))
49
        self.socket = TSocket.TSocket(host='localhost', port=int(self.local_port))
50
        self.transport = TTransport.TFramedTransport(self.socket)
50
        self.transport = TTransport.TFramedTransport(self.socket)
51
        self.protocol = TBinaryProtocol.TBinaryProtocol(trans=self.transport, strictRead=False, strictWrite=False)
51
        self.protocol = TBinaryProtocol.TBinaryProtocol(trans=self.transport, strictRead=False, strictWrite=False)
-
 
52
        while True:
-
 
53
            try:
52
        self.client = scribe.Client(iprot=self.protocol, oprot=self.protocol)
54
                self.client = scribe.Client(iprot=self.protocol, oprot=self.protocol)
53
        self.transport.open()
55
                self.transport.open()                
-
 
56
            except:
-
 
57
                log_entry("DataLogger", "Connection not made. continuing")
-
 
58
                continue
-
 
59
            log_entry("DataLogger", "Connection successfull. breaking")
-
 
60
            break
54
 
61
 
55
        
62
        
56
    def log(self, messageType, message):
63
    def log(self, messageType, message):
57
        if message:
64
        if message:
58
            if messageType:
65
            if messageType: