Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
036dad3f
Commit
036dad3f
authored
Oct 26, 2015
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_data_notebook bt5: Exception catch for only json dump to make code more readable
parent
ace10d25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_data_notebook/SkinTemplateItem/portal_skins/erp5_data_notebook/Base_executeJupyter.xml
...m/portal_skins/erp5_data_notebook/Base_executeJupyter.xml
+5
-2
No files found.
bt5/erp5_data_notebook/SkinTemplateItem/portal_skins/erp5_data_notebook/Base_executeJupyter.xml
View file @
036dad3f
...
...
@@ -152,9 +152,10 @@ result = {\n
}\n
\n
# Catch exception while seriaizing the result to be passed to jupyter frontend\n
# and in case of error put code_result as None and status as \'error\' which would\n
# be shown by Jupyter frontend\n
try:\n
serialized_result = json.dumps(result)\n
data_notebook_line.edit(notebook_code_result=code_result)\n
except UnicodeDecodeError:\n
result = {\n
u\'code_result\': None,\n
...
...
@@ -164,7 +165,9 @@ except UnicodeDecodeError:\n
u\'status\': u\'error\'\n
}\n
serialized_result = json.dumps(result)\n
\n
\n
data_notebook_line.edit(notebook_code_result=code_result)\n
\n
return serialized_result\n
</string>
</value>
</item>
...
...
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