##// END OF EJS Templates
Catch specific error instead of all errors.
Jonathan Frederic -
Show More
@@ -25,7 +25,7 b' import collections'
25 import datetime
25 import datetime
26
26
27 # other libs/dependencies
27 # other libs/dependencies
28 from jinja2 import Environment, FileSystemLoader, ChoiceLoader
28 from jinja2 import Environment, FileSystemLoader, ChoiceLoader, TemplateNotFound
29
29
30 # IPython imports
30 # IPython imports
31 from IPython.config.configurable import Configurable
31 from IPython.config.configurable import Configurable
@@ -214,7 +214,7 b' class Exporter(Configurable):'
214 try:
214 try:
215 self.template = self.environment.get_template(try_name)
215 self.template = self.environment.get_template(try_name)
216 break
216 break
217 except:
217 except TemplateNotFound:
218 pass
218 pass
219
219
220 if hasattr(self, 'template'):
220 if hasattr(self, 'template'):
General Comments 0
You need to be logged in to leave comments. Login now