11 lines
259 B
Python
11 lines
259 B
Python
|
from asciimatics.exceptions import NextScene
|
||
|
|
||
|
import requests
|
||
|
|
||
|
|
||
|
def handle_sync_response(resp: requests.Response, model):
|
||
|
if resp.status_code != 200:
|
||
|
model.error_message = resp.text.rstrip()
|
||
|
raise NextScene('Error')
|
||
|
return resp.json()
|