def __init__(self, iocb):
    if _debug:
        IOChainMixIn._debug('__init__ %r', iocb)
    self.ioChain = iocb
    self.add_callback(self.chain_callback)
    if (not self.ioChain):
        return
    iocb.ioController = self
    iocb.ioState = ACTIVE
    try:
        if _debug:
            IOChainMixIn._debug('    - encoding')
        self.Encode()
        if _debug:
            IOChainMixIn._debug('    - encode complete')
    except:
        err = sys.exc_info()[1]
        if _debug:
            IOChainMixIn._exception('    - encoding exception: %r', err)
        iocb.abort(err)
def __init__(self, iocb):
    if _debug:
        IOChainMixIn._debug('__init__ %r', iocb)
    self.ioChain = iocb
    self.add_callback(self.chain_callback)
    if (not self.ioChain):
        return
    iocb.ioController = self
    iocb.ioState = ACTIVE
    try:
        if _debug:
            IOChainMixIn._debug('    - encoding')
        self.Encode()
        if _debug:
            IOChainMixIn._debug('    - encode complete')
    except:
        err = sys.exc_info()[1]
        if _debug:
            IOChainMixIn._exception('    - encoding exception: %r', err)
        iocb.abort(err)