diff --git a/Makefile b/Makefile index 5bca252..d61b5a4 100644 --- a/Makefile +++ b/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 ; diff --git a/bitter/VERSION b/bitter/VERSION index 8bd6ba8..c006218 100644 --- a/bitter/VERSION +++ b/bitter/VERSION @@ -1 +1 @@ -0.7.5 +0.7.6 diff --git a/bitter/utils.py b/bitter/utils.py index 046a212..7e59018 100644 --- a/bitter/utils.py +++ b/bitter/utils.py @@ -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)