Commit 7a0b072e authored by Ayush Tiwari's avatar Ayush Tiwari

IPython Notebook: Added python_expression as param in request in erp5 kernel*

parent 3d2fd4f0
......@@ -38,8 +38,14 @@ class ERP5Kernel(Kernel):
self.pwd = code.split()[1]
if self.user:
try:
# Dirty hack here just to send some random parameter
# Should be removed with better way to get 200 status code
# for correct credentials or yet better make 204 also accepatble
test = 'return test'
res = requests.get(self.url, verify=False,
auth=(self.user, self.pwd))
auth=(self.user, self.pwd),
params={'python-expression': test})
self.status_code = res.status_code
if self.status_code != 200:
resp = 'Incorrect username or password'
......
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