equal
deleted
inserted
replaced
35 |
35 |
36 conn = TCPConnection(sock, sock.getpeername()) |
36 conn = TCPConnection(sock, sock.getpeername()) |
37 # receive the authentication challenge string, and use that to build the actual identification string. |
37 # receive the authentication challenge string, and use that to build the actual identification string. |
38 try: |
38 try: |
39 authChallenge = self.recvAuthChallenge(conn) |
39 authChallenge = self.recvAuthChallenge(conn) |
40 except ProtocolError, x: |
40 except ProtocolError as x: |
41 # check if we were denied |
41 # check if we were denied |
42 if hasattr(x, "partialMsg") and x.partialMsg[:len(self.denyMSG)] == self.denyMSG: |
42 if hasattr(x, "partialMsg") and x.partialMsg[:len(self.denyMSG)] == self.denyMSG: |
43 raise ConnectionDeniedError(Pyro.constants.deniedReasons[int(x.partialMsg[-1])]) |
43 raise ConnectionDeniedError(Pyro.constants.deniedReasons[int(x.partialMsg[-1])]) |
44 else: |
44 else: |
45 raise |
45 raise |