Commit ba8cad61 authored by Zheng Yile's avatar Zheng Yile
Browse files

Modify codiaclient/network.py

parent 12b96534
......@@ -458,7 +458,8 @@ mutation startSession($pid: ID!, $code: String) {
}'''})
res = post(url = url, headers = headers, data = data)
if not res: return False
return json.loads(res.text)['data']['startSession']
try: return json.loads(res.text)['data']['startSession']
except: return False
def _login(username, passwd):
headers = login_base_headers.copy()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment