diff --git a/scrython/rulings/rulings_object.py b/scrython/rulings/rulings_object.py index 5781081..38a027d 100644 --- a/scrython/rulings/rulings_object.py +++ b/scrython/rulings/rulings_object.py @@ -40,48 +40,48 @@ class RulingsObject(object): def object(self): if self.__checkForKey('object') is None: - return KeyError('This object has no key \'object\'') + raise KeyError('This object has no key \'object\'') return self.scryfallJson['object'] def has_more(self): if self.__checkForKey('has_more') is None: - return KeyError('This object has no key \'has_more\'') + raise KeyError('This object has no key \'has_more\'') return self.scryfallJson['has_more'] def data(self): if self.__checkForKey('data') is None: - return KeyError('This object has no key \'data\'') + raise KeyError('This object has no key \'data\'') return self.scryfallJson['data'] def data_length(self): if self.__checkForKey('data') is None: - return KeyError('This object has no key \'data\'') + raise KeyError('This object has no key \'data\'') return len(self.scryfallJson['data']) def ruling_object(self, num): if self.__checkForTupleKey('data', num, 'object') is None: - return KeyError('This ruling has no key \'object\'') + raise KeyError('This ruling has no key \'object\'') return self.scryfallJson['data'][num]['object'] def ruling_source(self, num): if self.__checkForTupleKey('data', num, 'source') is None: - return KeyError('This ruling has no key \'source\'') + raise KeyError('This ruling has no key \'source\'') return self.scryfallJson['data'][num]['source'] def ruling_published_at(self, num): if self.__checkForTupleKey('data', num, 'published_at') is None: - return KeyError('This ruling has no key \'published_at\'') + raise KeyError('This ruling has no key \'published_at\'') return self.scryfallJson['data'][num]['published_at'] def ruling_comment(self, num): if self.__checkForTupleKey('data', num, 'comment') is None: - return KeyError('This ruling has no key \'comment\'') + raise KeyError('This ruling has no key \'comment\'') return self.scryfallJson['data'][num]['comment']