Created
May 14, 2010 01:44
-
-
Save hmax/400710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prepareExchanges(self, conn): | |
log.msg("preparing") | |
self._chan = conn.channel(1) | |
self._chan = self._chan.addCallback(lambda c: c.channel_open()) | |
res = self._chan.addCallback(lambda c: c.exchange_declare(exchange=self._exchange, type="direct", durable=True, auto_delete=False)) | |
return res | |
deferred = client.authenticate(self.user, self.password) | |
self._conn = deferred | |
deferred = deferred.addCallback(self.prepareExchanges) | |
deferred = deferred.addCallback(self.associateConnectionWithBots) | |
return deferred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment