Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from qtheuret/qtheuret-patch-1
Browse files Browse the repository at this point in the history
[FIX] Fix KeyError when a kwargs key is not defined
  • Loading branch information
foxmask committed Sep 2, 2018
2 parents 1e0942f + 17b1860 commit 8d1e10a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wallabag_api/wallabag.py
Expand Up @@ -124,9 +124,10 @@ def __get_attr(what, type_attr, value_attr, **kwargs):
:param kwargs:
:return: value of the parm
"""
value = int(kwargs[what]) if type_attr == 'int' else kwargs[what]
if what in kwargs and value in value_attr:
return value
if what in kwargs:
value = int(kwargs[what]) if type_attr == 'int' else kwargs[what]
if value in value_attr:
return value

# ENTRIES
async def get_entries(self, **kwargs):
Expand Down

0 comments on commit 8d1e10a

Please sign in to comment.