From a50f1b20771659ef7ed46ce631ae2ee0fa91189e Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 21 May 2016 17:11:00 -0700 Subject: [PATCH] Fixups --- anki_connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki_connect.py b/anki_connect.py index 5665c69..fda5a2c 100644 --- a/anki_connect.py +++ b/anki_connect.py @@ -289,9 +289,9 @@ class AnkiConnect: def handler(self, request): - action = 'api_' + request.get('action', '') + action = 'api_' + (request.get('action') or '') if hasattr(self, action): - return getattr(self, action)(**request.get('params', {})) + return getattr(self, action)(**(request.get('params') or {})) def api_deckNames(self):