Show More
@@ -354,7 +354,7 b' class NotebookNotary(LoggingConfigurable):' | |||
|
354 | 354 | trust_flags = { |
|
355 | 355 | 'reset' : ( |
|
356 | 356 | {'TrustNotebookApp' : { 'reset' : True}}, |
|
357 |
""" |
|
|
357 | """Delete the trusted notebook cache. | |
|
358 | 358 | All previously signed notebooks will become untrusted. |
|
359 | 359 | """ |
|
360 | 360 | ), |
@@ -383,7 +383,7 b' class TrustNotebookApp(BaseIPythonApplication):' | |||
|
383 | 383 | flags = trust_flags |
|
384 | 384 | |
|
385 | 385 | reset = Bool(False, config=True, |
|
386 |
help="""If True, |
|
|
386 | help="""If True, delete the trusted signature cache. | |
|
387 | 387 | After reset, all previously signed notebooks will become untrusted. |
|
388 | 388 | """ |
|
389 | 389 | ) |
@@ -413,6 +413,9 b' class TrustNotebookApp(BaseIPythonApplication):' | |||
|
413 | 413 | |
|
414 | 414 | def start(self): |
|
415 | 415 | if self.reset: |
|
416 | if os.path.exists(self.notary.db_file): | |
|
417 | print("Removing trusted signature cache: %s" % self.notary.db_file) | |
|
418 | os.remove(self.notary.db_file) | |
|
416 | 419 | self.generate_new_key() |
|
417 | 420 | return |
|
418 | 421 | if not self.extra_args: |
@@ -16,9 +16,9 b' class TestNotary(TestsBase):' | |||
|
16 | 16 | |
|
17 | 17 | def setUp(self): |
|
18 | 18 | self.notary = sign.NotebookNotary( |
|
19 | db_file=':memory:', | |
|
19 | 20 | secret=b'secret', |
|
20 | 21 | profile_dir=get_ipython().profile_dir, |
|
21 | db_file=':memory:' | |
|
22 | 22 | ) |
|
23 | 23 | with self.fopen(u'test3.ipynb', u'r') as f: |
|
24 | 24 | self.nb = read(f, as_version=4) |
General Comments 0
You need to be logged in to leave comments.
Login now