Commits

Anonymous committed e7df391

typo in socket variable name

Comments (0)

Files changed (1)

 
     def open_log(self, logpath):
         logger = logging.getLogger(logpath)
-        hdlr = logging.FileHandler('log.txt')
+        hdlr = logging.FileHandler('~/log.txt')
         formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
         hdlr.setFormatter(formatter)
         logger.addHandler(hdlr)
         
         while(1):
             client_sock,address = server_sock.accept()
-            process_client(client, "rfcomm", i, address)
+            process_client(client_sock, "rfcomm", i, address)
 
 
 
 	
         while(1):
             client_sock,address = server_sock.accept()
-            process_client(client, "l2cap", i, address)
+            process_client(client_sock, "l2cap", i, address)
 
 
                 
     for i in range(1,31):
         rfcomm.append(i)
 
-    logger.info("Rfcomm sockets to monitor are %s" % len(rfcomm))
-    #dovrebbe funzionare anche
-    #logger.info("Rfcomm sockets to monitor are {0}".format(len(rfcomm))
+    #logger.info("Rfcomm sockets to monitor are %s" % len(rfcomm))
+        logger.info("Rfcomm sockets to monitor are {0}".format(len(rfcomm))
     logger.info("Rfcomm {0}".format(rfcomm))
 
     i = 0x1001 # it should be possible to write like this