mirror of
https://github.com/balkian/bitter.git
synced 2024-12-22 00:18:12 +00:00
Fixed JSON regression
This commit is contained in:
parent
9c82dea298
commit
27bc3557b2
2
Makefile
2
Makefile
@ -38,7 +38,7 @@ test: $(addprefix test-,$(PYMAIN))
|
||||
testall: $(addprefix test-,$(PYVERSIONS))
|
||||
|
||||
test-%: build-%
|
||||
docker run --rm -w /usr/src/app/ -v $$PWD/tests/credentials.json:/usr/src/app/tests/credentials.json --entrypoint=/usr/local/bin/python -ti '$(REPO)/$(NAME):$(VERSION)-python$*' setup.py test --addopts "-vvv -s --pdb" ;
|
||||
docker run --rm -w /usr/src/app/ --env-file $$PWD/.env -v $$PWD/tests/credentials.json:/usr/src/app/tests/credentials.json --entrypoint=/usr/local/bin/python -ti '$(REPO)/$(NAME):$(VERSION)-python$*' setup.py test --addopts "-vvv -s --pdb" ;
|
||||
|
||||
pip_test-%:
|
||||
docker run --rm -v $$PWD/dist:/dist/ -ti python:$* pip install /dist/$(NAME)-$(VERSION).tar.gz ;
|
||||
|
@ -1 +1 @@
|
||||
0.7.5
|
||||
0.7.6
|
||||
|
@ -153,7 +153,7 @@ def read_file(filename, tail=False):
|
||||
while True:
|
||||
line = f.readline()
|
||||
if line not in (None, '', '\n'):
|
||||
tweet = json.load(line.strip())
|
||||
tweet = json.loads(line.strip())
|
||||
yield tweet
|
||||
else:
|
||||
if tail:
|
||||
@ -440,7 +440,7 @@ def download_tweet(wq, tweetid, write=True, folder="downloaded_tweets", update=F
|
||||
tweet = None
|
||||
if update or not cached:
|
||||
tweet = get_tweet(wq, tweetid)
|
||||
js = json.dump(tweet, indent=2)
|
||||
js = json.dumps(tweet, indent=2)
|
||||
if write:
|
||||
if tweet:
|
||||
write_tweet_json(js, folder)
|
||||
|
Loading…
Reference in New Issue
Block a user