Show More
@@ -47,11 +47,11 b' class KernelRestarter(LoggingConfigurable):' | |||||
47 |
|
47 | |||
48 | def register_callback(self, f): |
|
48 | def register_callback(self, f): | |
49 | """register a callback to fire""" |
|
49 | """register a callback to fire""" | |
50 | self.callbacks.append(f) |
|
50 | self._callbacks.append(f) | |
51 |
|
51 | |||
52 | def unregister_callback(self, f): |
|
52 | def unregister_callback(self, f): | |
53 | try: |
|
53 | try: | |
54 | self.callbacks.remove(f) |
|
54 | self._callbacks.remove(f) | |
55 | except ValueError: |
|
55 | except ValueError: | |
56 | pass |
|
56 | pass | |
57 |
|
57 | |||
@@ -59,7 +59,7 b' class KernelRestarter(LoggingConfigurable):' | |||||
59 | self.log.debug('Polling kernel...') |
|
59 | self.log.debug('Polling kernel...') | |
60 | if not self.kernel_manager.is_alive(): |
|
60 | if not self.kernel_manager.is_alive(): | |
61 | self.log.info('KernelRestarter: restarting kernel') |
|
61 | self.log.info('KernelRestarter: restarting kernel') | |
62 | for callback in self.callbacks: |
|
62 | for callback in self._callbacks: | |
63 | try: |
|
63 | try: | |
64 | callback() |
|
64 | callback() | |
65 | except Exception as e: |
|
65 | except Exception as e: |
General Comments 0
You need to be logged in to leave comments.
Login now