Show More
@@ -151,11 +151,23 b' class NbConvertApp(BaseIPythonApplication):' | |||||
151 | resources = {} |
|
151 | resources = {} | |
152 | resources['unique_key'] = notebook_name |
|
152 | resources['unique_key'] = notebook_name | |
153 |
|
153 | |||
154 |
# |
|
154 | #Try to export | |
155 | output, resources = export_by_name(self.export_format, |
|
155 | try: | |
|
156 | return_value = export_by_name(self.export_format, | |||
156 |
|
|
157 | notebook_filename, | |
157 |
|
|
158 | resources=resources, | |
158 |
|
|
159 | config=self.config) | |
|
160 | except NameError as e: | |||
|
161 | print("Error: '%s' exporter not found." % self.export_format, | |||
|
162 | file=sys.stderr) | |||
|
163 | print("Known exporters are:", | |||
|
164 | "\n\t" + "\n\t".join(get_export_names()), | |||
|
165 | file=sys.stderr) | |||
|
166 | sys.exit(-1) | |||
|
167 | else: | |||
|
168 | output, resources = return_value | |||
|
169 | ||||
|
170 | #Write | |||
159 | self.writer.write(output, resources, notebook_name=notebook_name) |
|
171 | self.writer.write(output, resources, notebook_name=notebook_name) | |
160 |
|
172 | |||
161 |
|
173 |
General Comments 0
You need to be logged in to leave comments.
Login now