Permalink
Browse files

start Twisted reactor by default

  • Loading branch information...
1 parent b85fa3d commit a8a2a3e604684b7015c984eca42dd7fb7cf54816 @rhymes committed Sep 23, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 pinder/room.py
View
@@ -115,11 +115,11 @@ def remove_highlight_from_message(self, message_id):
path = 'messages/%s/star' % message_id
self._connector.delete(path)
- def listen(self, callback, errback):
+ def listen(self, callback, errback, start_reactor=True):
("Listens on room conversation calling the callback on each message. "
"The errback will be called upon networking problems, parsing errors "
"and on shutdown. The callback's argument is the message. "
- "The errback's is the exception.")
+ "The errback's is the exception. start_reactor as True starts Twisted's reactor")
from pinder import streaming
username, password = self._connector.get_credentials()
- streaming.start(username, password, self.id, callback, errback)
+ streaming.start(username, password, self.id, callback, errback, start_reactor)

0 comments on commit a8a2a3e

Please sign in to comment.