'Make sure the channel is not closed and then publish. Return a
Deferred that fires with the result of the channel\'s basic_publish.'

def basic_publish(self, *args, **kwargs):

    if self.__closed:
        return defer.fail(self.__closed)
    return defer.succeed(self.__channel.basic_publish(*args, **kwargs))
