diff --git a/file_transfer/receive_file.py b/file_transfer/receive_file.py index b5aa6e31a..cfba6ed88 100644 --- a/file_transfer/receive_file.py +++ b/file_transfer/receive_file.py @@ -13,7 +13,7 @@ if __name__ == "__main__": print("Receiving data...") while True: data = sock.recv(1024) - print(f"data={str(data)}") + print(f"data={data}") if not data: break out_file.write(data) # Write data to a file diff --git a/file_transfer/send_file.py b/file_transfer/send_file.py index 65cf25c9d..5b53471df 100644 --- a/file_transfer/send_file.py +++ b/file_transfer/send_file.py @@ -13,7 +13,7 @@ def send_file(filename: str = "mytext.txt", testing: bool = False) -> None: conn, addr = sock.accept() # Establish connection with client. print(f"Got connection from {addr}") data = conn.recv(1024) - print(f"Server received {str(data)}") + print(f"Server received {data}") with open(filename, "rb") as in_file: data = in_file.read(1024)