Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dict.get() call when retrieving props form page #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[bumpversion]
current_version = 1.4.1
commit = True
tag = True

26 changes: 26 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
image: upress/gitlab-base:23

services:
- docker:dind

variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay

stages:
- 📦 pypi
- flake

build-push:
stage: 📦 pypi
script:
- python3 setup.py sdist
- twine upload --repository-url https://pkg.ubiquity.press/simple/ -u $PKG_UBIQUITY_USER -p $PKG_UBIQUITY_PW dist/*
only:
- tags

flake:
stage: flake
script:
- flake8 wikipedia
allow_failure: true
2 changes: 1 addition & 1 deletion wikipedia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .wikipedia import *
from .exceptions import *

__version__ = (1, 4, 0)
__version__ = (1, 4, 1)
2 changes: 1 addition & 1 deletion wikipedia/wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def __continued_query(self, query_params):
for datum in pages.values(): # in python 3.3+: "yield from pages.values()"
yield datum
else:
for datum in pages[self.pageid][prop]:
for datum in pages[self.pageid].get(prop, []):
yield datum

if 'continue' not in request:
Expand Down