Skip to content

Commit c5acb34

Browse files
committed
improve code, i.e. make pylint happy
1 parent 6217856 commit c5acb34

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

twtoolbox/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
from itertools import izip_longest as zip_longest # pylint: disable=no-name-in-module
2828
except ImportError:
2929
from itertools import zip_longest # pylint: disable=no-name-in-module
30-
import colorlog
3130
from pkg_resources import resource_stream
31+
import colorlog
3232
from tweepy import TweepError, API, AppAuthHandler, OAuthHandler, Cursor
3333

3434
# module constants

twtoolbox/streaming.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PassThroughStreamListener(StreamListener):
3333
"""Stream Listener that passes incoming messages directly to a writer."""
3434

3535
def __init__(self, writer, limit=0, **kwargs):
36-
super(self.__class__, self).__init__(**kwargs)
36+
super(PassThroughStreamListener, self).__init__(**kwargs)
3737
self.writer = writer
3838
self.limit = limit
3939
self.num_written = 0
@@ -51,6 +51,7 @@ def on_error(self, status_code):
5151
if status_code == 420:
5252
LOGGER.error("too many connection attempts, stopping stream")
5353
return False
54+
return True
5455

5556
def _get_stream(writer, config, limit=0):
5657
api = get_oauth_api(config)

0 commit comments

Comments
 (0)