Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
7a0b072e
Commit
7a0b072e
authored
Jun 11, 2015
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPython Notebook: Added python_expression as param in request in erp5 kernel*
parent
3d2fd4f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
software/ipython_notebook/template/ERP5kernel.py.jinja
software/ipython_notebook/template/ERP5kernel.py.jinja
+7
-1
No files found.
software/ipython_notebook/template/ERP5kernel.py.jinja
View file @
7a0b072e
...
@@ -38,8 +38,14 @@ class ERP5Kernel(Kernel):
...
@@ -38,8 +38,14 @@ class ERP5Kernel(Kernel):
self.pwd = code.split()[1]
self.pwd = code.split()[1]
if self.user:
if self.user:
try:
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,
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
self.status_code = res.status_code
if self.status_code != 200:
if self.status_code != 200:
resp = 'Incorrect username or password'
resp = 'Incorrect username or password'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment