소스 검색

fixed bug, python doesn't recognize class variables of the superclass in function definitions

digital 7 년 전
부모
커밋
0d692db8e4
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      network/__init__.py

+ 3 - 1
network/__init__.py

@@ -144,11 +144,13 @@ class ConnHandler(object):
         """
         self.send("Welcome client, this is the server sending!")
 
-    async def recv(self,block_size=block_size):
+    async def recv(self,block_size=None):
         """
         This method waits for the client to send something, decodes it and
         returns a string.
         """
+        if block_size == None:
+            block_size = self.block_size
         data_received = await self.recv(block_size=block_size)
         data_decoded = data_received.decode("utf-8")
         return data_decoded