From 75d7f23e2c7b7d001a04a96e4c92ca1d742fdc05 Mon Sep 17 00:00:00 2001 From: Richie <2837357W@student.gla.ac.uk> Date: Thu, 26 Oct 2023 16:30:27 +0800 Subject: [PATCH] change return to t/f --- safeshare/safeshare_vdb/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/safeshare/safeshare_vdb/client.py b/safeshare/safeshare_vdb/client.py index 8e42fee..86735f8 100644 --- a/safeshare/safeshare_vdb/client.py +++ b/safeshare/safeshare_vdb/client.py @@ -9,15 +9,15 @@ class Client: def CheckFile(self, sha_256_id: str): response = self.stub.CheckHash(pb2.Request(file_hash=sha_256_id)) - print(response) + return response.is_exist def UpdateFile(self, sha_256_id: str): response = self.stub.UpdateHash(pb2.Request(file_hash=sha_256_id)) - print(response) + return response.is_exist if __name__ == "__main__": client = Client() id = "15e4313dddb45875ed67d1ab25f1f5b76f0b3a23e4fa9308c521e3fb30068028" - client.CheckFile(id) + print(client.CheckFile(id)) # client.UpdateFile(id)