From c27ea2cb7f62900f6fbcd010c03ab5edbe0a5a82 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Mon, 29 Oct 2018 16:33:21 -0400 Subject: [PATCH] Fixed bug with Named --- scrython/cards/named.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scrython/cards/named.py b/scrython/cards/named.py index 91afc4c..267c162 100644 --- a/scrython/cards/named.py +++ b/scrython/cards/named.py @@ -40,18 +40,17 @@ class Named(CardsObject): >>> card.colors() """ def __init__(self, **kwargs): - if kwargs.get('exact') is None or kwargs.get('fuzzy') is None: - raise Exception('You must provide a `fuzzy` or `exact` parameter.') self.dict = { 'set':kwargs.get('set', '') } - if kwargs.get('exact') is not None: + if 'exact' in kwargs: self.dict['exact'] = kwargs.get('exact') - - if kwargs.get('fuzzy') is not None: + elif 'fuzzy' in kwargs: self.dict['fuzzy'] = kwargs.get('fuzzy') + else: + raise Exception('You must provide a `fuzzy` or `exact` parameter.') self.args = urllib.parse.urlencode(self.dict) self.url = 'cards/named?' + self.args