Skip to content

Commit

Permalink
Closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
omarryhan authored Aug 1, 2021
1 parent 6a5eb35 commit 8b01100
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyfy/wrappers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from functools import wraps
from inspect import iscoroutinefunction

from json.decoder import JSONDecodeError


def _set_and_get_me_attr_sync(self, attr_name):
""" either populates user creds from spotify or just calls self.me and gets (and sets) the attr_name passed """
Expand Down Expand Up @@ -142,7 +140,7 @@ def sync_wrapper(self, *args, **kwargs):
return self._send_authorized_request(request).json()
else:
return self._send_request(request).json()
except JSONDecodeError:
except ValueError:
return {}
else:
return {}
Expand Down

0 comments on commit 8b01100

Please sign in to comment.