ident.pyx: Remove traces of bogus `failed' and `eof' callbacks.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 28 Jul 2017 23:47:11 +0000 (00:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Aug 2017 03:31:32 +0000 (04:31 +0100)
The `eof' callback was just a loose property and didn't actually work at
all.  The `failed' callback had all of the necessary machinery but was
never invoked.

ident.pyx

index 7ea6b45..1c2789e 100644 (file)
--- a/ident.pyx
+++ b/ident.pyx
@@ -48,12 +48,9 @@ cdef class SelIdentify:
   cdef _user
   cdef _bad
   cdef _error
-  cdef _failed
   cdef _bogus
-  def __cinit__(me, sk,
-              userproc = None, bogusproc = None,
-              badproc = None, errorproc = None, failedproc = None,
-              *hunoz, **hukairz):
+  def __cinit__(me, sk, userproc = None, bogusproc = None,
+                badproc = None, errorproc = None, *hunoz, **hukairz):
     cdef sockaddr_in s_in, s_out
     cdef socklen_t sz_in, sz_out
     cdef int fd
@@ -78,7 +75,6 @@ cdef class SelIdentify:
     me._user = _checkcallable(userproc, 'user proc')
     me._bad = _checkcallable(badproc, 'bad proc')
     me._error = _checkcallable(errorproc, 'error proc')
-    me._failed = _checkcallable(failedproc, 'failed proc')
     me._bogus = _checkcallable(bogusproc, 'bogus proc')
   def __dealloc__(me):
     if me._activep:
@@ -93,13 +89,6 @@ cdef class SelIdentify:
       me._user = _checkcallable(proc, 'user proc')
     def __del__(me):
       me._user = None
-  property eofproc:
-    def __get__(me):
-      return me._eof
-    def __set__(me, proc):
-      me._eof = _checkcallable(proc, 'eof proc')
-    def __del__(me):
-      me._eof = None
   property badproc:
     def __get__(me):
       return me._bad
@@ -114,13 +103,6 @@ cdef class SelIdentify:
       me._error = _checkcallable(proc, 'error proc')
     def __del__(me):
       me._error = None
-  property failedproc:
-    def __get__(me):
-      return me._failed
-    def __set__(me, proc):
-      me._failed = _checkcallable(proc, 'failed proc')
-    def __del__(me):
-      me._failed = None
   property bogusproc:
     def __get__(me):
       return me._bogus
@@ -148,10 +130,6 @@ cdef class SelIdentify:
     if me._error is not None:
       return me._error(error)
     return me.bogus()
-  def failed(me, errno, strerror):
-    if me._failed is not None:
-      return me._failed(errno, strerror)
-    return me.bogus()
   def bogus(me):
     return _maybecall(me._bogus, ())