Skip to content

Commit 40f020d

Browse files
committed
Bugfix
1 parent d59645a commit 40f020d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
dist = setup(
2121
name='twitter-tap',
22-
version='2.2.0',
22+
version='2.2.1',
2323
author='Janez Kranjc',
2424
description='Collect tweets to a mongoDB using either the Twitter search API or the streaming API.',
2525
long_description=long_description,

twitter_tap/filer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def emit(self, dict_entry):
2424
text_to_wtite = json.dumps(dict_entry) + "\n"
2525
self.file.write(text_to_wtite)
2626
self.counter += 1
27-
if self.counter > self.flush_every:
27+
if self.counter % self.flush_every == 0:
2828
self.file.flush()
2929
if self.counter >= self.n: # add condition "if new day"
3030
self.close_file()

0 commit comments

Comments
 (0)