old_contents: #!/usr/bin/python
  
  import bluetooth
  from datetime import datetime
  
  server_sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
  port = 10
  server_sock.bind(("", port))
  server_sock.listen(0)
  
  while True:
      client_sock,address = server_sock.accept()
      data = client_sock.recv(1024)
      print datetime.now(), "-", data
      client_sock.close()
  
  server_sock.close()
  
new_contents: #!/usr/bin/python
  
  import bluetooth
  import exceptions
  from datetime import datetime
  
  server_sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
  port = 10
  server_sock.bind(("", port))
  server_sock.listen(0)
  
  while True:
      client_sock,address = server_sock.accept()
      data = ""
      while True:
         try:
             data += client_sock.recv(1024)
         except:
             break;
      print datetime.now(), "-", data
      client_sock.close()
  
  server_sock.close()
  
subject: fix test server