Commit 17f151b8 authored by Aaron Hill's avatar Aaron Hill
Browse files

Revert "Don't add 'delimited=length' to self.parameters"

This reverts commit 4374ec2f.
Until I figure out what's going on with 'delimited=length', I'm going to
leave things as-is.
parent 4374ec2f
...@@ -242,7 +242,7 @@ class Stream(object): ...@@ -242,7 +242,7 @@ class Stream(object):
def userstream(self, stall_warnings=False, _with=None, replies=None, def userstream(self, stall_warnings=False, _with=None, replies=None,
track=None, locations=None, async=False, encoding='utf8'): track=None, locations=None, async=False, encoding='utf8'):
self.parameters = {} self.parameters = {'delimited': 'length'}
if self.running: if self.running:
raise TweepError('Stream object already connected!') raise TweepError('Stream object already connected!')
self.url = '/%s/user.json?delimited=length' % STREAM_VERSION self.url = '/%s/user.json?delimited=length' % STREAM_VERSION
...@@ -263,7 +263,7 @@ class Stream(object): ...@@ -263,7 +263,7 @@ class Stream(object):
self._start(async) self._start(async)
def firehose(self, count=None, async=False): def firehose(self, count=None, async=False):
self.parameters = {} self.parameters = {'delimited': 'length'}
if self.running: if self.running:
raise TweepError('Stream object already connected!') raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/firehose.json?delimited=length' % STREAM_VERSION self.url = '/%s/statuses/firehose.json?delimited=length' % STREAM_VERSION
...@@ -272,14 +272,14 @@ class Stream(object): ...@@ -272,14 +272,14 @@ class Stream(object):
self._start(async) self._start(async)
def retweet(self, async=False): def retweet(self, async=False):
self.parameters = {} self.parameters = {'delimited': 'length'}
if self.running: if self.running:
raise TweepError('Stream object already connected!') raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/retweet.json?delimited=length' % STREAM_VERSION self.url = '/%s/statuses/retweet.json?delimited=length' % STREAM_VERSION
self._start(async) self._start(async)
def sample(self, async=False): def sample(self, async=False):
self.parameters = {} self.parameters = {'delimited': 'length'}
if self.running: if self.running:
raise TweepError('Stream object already connected!') raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/sample.json?delimited=length' % STREAM_VERSION self.url = '/%s/statuses/sample.json?delimited=length' % STREAM_VERSION
...@@ -306,6 +306,7 @@ class Stream(object): ...@@ -306,6 +306,7 @@ class Stream(object):
if languages: if languages:
self.parameters['language'] = ','.join(map(str, languages)) self.parameters['language'] = ','.join(map(str, languages))
self.body = urlencode_noplus(self.parameters) self.body = urlencode_noplus(self.parameters)
self.parameters['delimited'] = 'length'
self._start(async) self._start(async)
def disconnect(self): def disconnect(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment