##// END OF EJS Templates
Check if class is an instance of Exporter, not TemplateExporter
Jonathan Frederic -
Show More
@@ -100,14 +100,14 b' def export(exporter, nb, **kw):'
100 #Check arguments
100 #Check arguments
101 if exporter is None:
101 if exporter is None:
102 raise TypeError("Exporter is None")
102 raise TypeError("Exporter is None")
103 elif not isinstance(exporter, TemplateExporter) and not issubclass(exporter, TemplateExporter):
103 elif not isinstance(exporter, Exporter) and not issubclass(exporter, Exporter):
104 raise TypeError("exporter does not inherit from Exporter (base)")
104 raise TypeError("exporter does not inherit from Exporter (base)")
105 if nb is None:
105 if nb is None:
106 raise TypeError("nb is None")
106 raise TypeError("nb is None")
107
107
108 #Create the exporter
108 #Create the exporter
109 resources = kw.pop('resources', None)
109 resources = kw.pop('resources', None)
110 if isinstance(exporter, TemplateExporter):
110 if isinstance(exporter, Exporter):
111 exporter_instance = exporter
111 exporter_instance = exporter
112 else:
112 else:
113 exporter_instance = exporter(**kw)
113 exporter_instance = exporter(**kw)
General Comments 0
You need to be logged in to leave comments. Login now