1
0
Fork 0
mirror of synced 2024-05-23 22:09:38 +12:00

Catch data being None

This commit is contained in:
Phxntxm 2017-07-03 21:02:07 -05:00
parent 4f816216f8
commit 2c47ab881b

View file

@ -24,6 +24,8 @@ class Twitch:
self.params = {'client_id': self.key}
def _form_embed(self, data):
if not data:
return None
# I want to make the least API calls possible, however there's a few things to note here:
# 1) When requesting /streams and a channel is offline, the channel data is not provided
# 2) When requesting /streams and a channel is online, the channel data is provided