##// END OF EJS Templates
trust method docstrings
MinRK -
Show More
@@ -52,7 +52,7 b' class NotebookManager(LoggingConfigurable):'
52 Parameters
52 Parameters
53 ----------
53 ----------
54 path : string
54 path : string
55 The
55 The path to check
56
56
57 Returns
57 Returns
58 -------
58 -------
@@ -225,9 +225,14 b' class NotebookManager(LoggingConfigurable):'
225 self.log.info(self.info_string())
225 self.log.info(self.info_string())
226
226
227 def trust_notebook(self, name, path=''):
227 def trust_notebook(self, name, path=''):
228 """Check for trusted cells, and sign the notebook.
228 """Explicitly trust a notebook
229
229
230 Called as a part of saving notebooks.
230 Parameters
231 ----------
232 name : string
233 The filename of the notebook
234 path : string
235 The notebook's directory
231 """
236 """
232 model = self.get_notebook(name, path)
237 model = self.get_notebook(name, path)
233 nb = model['content']
238 nb = model['content']
@@ -239,6 +244,15 b' class NotebookManager(LoggingConfigurable):'
239 """Check for trusted cells, and sign the notebook.
244 """Check for trusted cells, and sign the notebook.
240
245
241 Called as a part of saving notebooks.
246 Called as a part of saving notebooks.
247
248 Parameters
249 ----------
250 nb : dict
251 The notebook structure
252 name : string
253 The filename of the notebook
254 path : string
255 The notebook's directory
242 """
256 """
243 if self.notary.check_cells(nb):
257 if self.notary.check_cells(nb):
244 self.notary.sign(nb)
258 self.notary.sign(nb)
@@ -249,6 +263,15 b' class NotebookManager(LoggingConfigurable):'
249 """Mark cells as trusted if the notebook signature matches.
263 """Mark cells as trusted if the notebook signature matches.
250
264
251 Called as a part of loading notebooks.
265 Called as a part of loading notebooks.
266
267 Parameters
268 ----------
269 nb : dict
270 The notebook structure
271 name : string
272 The filename of the notebook
273 path : string
274 The notebook's directory
252 """
275 """
253 trusted = self.notary.check_signature(nb)
276 trusted = self.notary.check_signature(nb)
254 if not trusted:
277 if not trusted:
General Comments 0
You need to be logged in to leave comments. Login now