def test_strerror(self): # refers to bug #8573 err = asyncore._strerror(errno.EPERM) if hasattr(os, 'strerror'): self.assertEqual(err, os.strerror(errno.EPERM)) err = asyncore._strerror(-1) self.assertTrue(err != "")
def test_strerror(self): # refers to bug #8573 err = asyncore._strerror(errno.EPERM) if hasattr(os, 'strerror'): self.assertEqual(err, os.strerror(errno.EPERM)) err = asyncore._strerror(-1) self.assertIn("unknown error", err.lower())
def handle_connect_event(self): err = self.socket.getsockopt(stdsocket.SOL_SOCKET, stdsocket.SO_ERROR) if err != 0: raise stdsocket.error(err, asyncore._strerror(err)) super(asyncore_dispatcher, self).handle_connect_event()
def test_strerror(self): err = asyncore._strerror(errno.EPERM) if hasattr(os, 'strerror'): self.assertEqual(err, os.strerror(errno.EPERM)) err = asyncore._strerror(-1) self.assertTrue(err != '')
def update_event(self, inp=-1): self.set_output_val(0, asyncore._strerror(self.input(0)))