Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit a5f6a7a1 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain

Merge branch 'hotfix/robustness_again'

parents 74caf511 7c14c719
......@@ -8,7 +8,7 @@
about/0
]).
version('4.1.7').
version('4.1.8').
copyright(
'Copyright (C) 2003-2018 Inria, EPI Lifeware, Saclay-Île de France, France'
......
......@@ -44,7 +44,8 @@ class BiochamKernel(Kernel):
self.comm_manager = CommManager(parent=self, kernel=self)
comm_msg_types = ['comm_open', 'comm_msg', 'comm_close']
for msg_type in comm_msg_types:
self.shell_handlers[msg_type] = getattr(self.comm_manager, msg_type)
self.shell_handlers[msg_type] = \
getattr(self.comm_manager, msg_type)
self._start_biocham()
def _start_biocham(self):
......@@ -85,7 +86,7 @@ class BiochamKernel(Kernel):
image_filenames, output = extract_image_filenames(output)
if output.startswith('ERROR:'):
status = 'error'
except:
except Exception:
self.biocham.child.kill(SIGINT)
self.biocham.run_command('a')
output = 'non-terminated command'
......@@ -152,6 +153,10 @@ class BiochamKernel(Kernel):
'text': line.strip() + '.',
'replace': False,
} for line in reversed(lines) if line.strip()]
elif magic.startswith('timeout '):
self.timeout = int(magic[8:].split()[0])
output = 'Timeout set to ' + str(self.timeout)
payload = []
elif magic.startswith('slider '):
output = ''
payload = []
......@@ -182,7 +187,8 @@ class BiochamKernel(Kernel):
'data': {
'text/html': ''.join([
'''
<label style="float: left; padding-left: 10px; padding-right: 0px; margin-right: 0px;">{param}</label>
<label style="float: left; padding-left: 10px; padding-right: 0px;
margin-right: 0px;">{param}</label>
<label id="{param}_val_{id}"
style="float: left; margin-left: 0px; padding-left: 0px;">
={current}</label>
......@@ -237,6 +243,7 @@ class BiochamKernel(Kernel):
output = '''The available magics are:
%lsmagic\tLists available magics
%load [file.bc]\tImport a biocham file as a notebook cell
%timeout [s]\tSets the timeout for the communication with the kernel
%slider <parameter> [parameter parameter]\tCreates a slider to change \
given parameter(s) in default simulation
'''
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
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