Skip to content

Commit

Permalink
fix: get data from the json response (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnishina committed Nov 20, 2022
1 parent 7b420db commit 2d5e0d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion focus.py
Expand Up @@ -22,7 +22,8 @@ def _is_streaming() -> bool:
"Authorization": "Bearer %s" % _ACCESS_TOKEN,
"Client-Id": _CLIENT_ID,
}
return bool(requests.get(url, headers=headers).data)
response = requests.get(url, headers=headers)
return bool(response.json()["data"])


def _maybe_rotate_files(timestamp: datetime.datetime):
Expand Down

0 comments on commit 2d5e0d0

Please sign in to comment.