From 7bbc9b1455a128ee4ce89ccf354d5893e20f0376 Mon Sep 17 00:00:00 2001 From: Matt Cooper Date: Tue, 3 Sep 2019 09:31:47 -0400 Subject: [PATCH] fix silly bugs --- examples/handle_errors.py | 2 +- scrython/foundation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/handle_errors.py b/examples/handle_errors.py index 7120d4e..67c373e 100644 --- a/examples/handle_errors.py +++ b/examples/handle_errors.py @@ -5,4 +5,4 @@ import scrython try: search = scrython.cards.Search(q="!Black Lotus") except scrython.ScryfallError as e: - print(str(e.status) + ' ' + e.code + ': ' + e.details) + print(str(e.error_details['status']) + ' ' + e.error_details['code'] + ': ' + e.error_details['details']) diff --git a/scrython/foundation.py b/scrython/foundation.py index cbe5ad1..844224c 100644 --- a/scrython/foundation.py +++ b/scrython/foundation.py @@ -35,7 +35,7 @@ class FoundationObject(object): loop.run_until_complete(main(loop)) if self.scryfallJson['object'] == 'error': - raise ScryfallError(self.scryfallJson, message=self.scryfallJson['details']) + raise ScryfallError(self.scryfallJson, self.scryfallJson['details']) def _checkForKey(self, key): """Checks for a key in the scryfallJson object.