##// END OF EJS Templates
Kernelspec handle case where folder already exists...
Matthias BUSSONNIER -
Show More
@@ -16,7 +16,7 b' from .kernelspec import KernelSpecManager, _pythonfirst'
16 class ListKernelSpecs(BaseIPythonApplication):
16 class ListKernelSpecs(BaseIPythonApplication):
17 description = """List installed kernel specifications."""
17 description = """List installed kernel specifications."""
18 kernel_spec_manager = Instance(KernelSpecManager)
18 kernel_spec_manager = Instance(KernelSpecManager)
19
19
20 # Not all of the base aliases are meaningful (e.g. profile)
20 # Not all of the base aliases are meaningful (e.g. profile)
21 aliases = {k: base_aliases[k] for k in ['ipython-dir', 'log-level']}
21 aliases = {k: base_aliases[k] for k in ['ipython-dir', 'log-level']}
22 flags = {'debug': base_flags['debug'],}
22 flags = {'debug': base_flags['debug'],}
@@ -119,6 +119,9 b' class InstallNativeKernelSpec(BaseIPythonApplication):'
119 if e.errno == errno.EACCES:
119 if e.errno == errno.EACCES:
120 print("Permission denied")
120 print("Permission denied")
121 self.exit(1)
121 self.exit(1)
122 if e.errno == errno.EEXIST:
123 print("File or folder already exists")
124 self.exit(1)
122 raise
125 raise
123
126
124 class KernelSpecApp(Application):
127 class KernelSpecApp(Application):
General Comments 0
You need to be logged in to leave comments. Login now