Socket Programming : how to receive data until a dot is received (Python)

Situation: I am currently writing a client program with a provided server program I need to send the command 'READ' and get a bunch of data from server

The server will just keep sending and lastly it will sd a dot (".") My task is to display all msg it send out (tgt with the dot) I can successfully receive everything and displayed. however i cannot exit the while loop(cannot successfully detect the dot) Why is that? Below is my code. thanks!

def READ(mySocket):

    op="READ"
    clientSocket.send(op.encode())

    while(True):
        try:
            rcvmsg = clientSocket.recv(4096)
            print("Server:{} ".format(rcvmsg.decode()))
            if (rcvmsg.decode() == "."):
                break
        except :
            print("some error happen" )
            sys.exit(1)