Show More
@@ -1,5 +1,5 b'' | |||||
1 | import json |
|
1 | import json | |
2 | from tornado import web |
|
2 | from tornado import web, gen | |
3 | from ..base.handlers import IPythonHandler, json_errors |
|
3 | from ..base.handlers import IPythonHandler, json_errors | |
4 | from ..utils import url_path_join |
|
4 | from ..utils import url_path_join | |
5 |
|
5 | |||
@@ -33,12 +33,12 b' class TerminalHandler(IPythonHandler):' | |||||
33 |
|
33 | |||
34 | @web.authenticated |
|
34 | @web.authenticated | |
35 | @json_errors |
|
35 | @json_errors | |
|
36 | @gen.coroutine | |||
36 | def delete(self, name): |
|
37 | def delete(self, name): | |
37 | tm = self.terminal_manager |
|
38 | tm = self.terminal_manager | |
38 | if name in tm.terminals: |
|
39 | if name in tm.terminals: | |
39 |
tm. |
|
40 | yield tm.terminate(name, force=True) | |
40 | # XXX: Should this wait for terminal to finish before returning? |
|
|||
41 | self.set_status(204) |
|
41 | self.set_status(204) | |
42 | self.finish() |
|
42 | self.finish() | |
43 | else: |
|
43 | else: | |
44 | raise web.HTTPError(404, "Terminal not found: %r" % name) No newline at end of file |
|
44 | raise web.HTTPError(404, "Terminal not found: %r" % name) |
General Comments 0
You need to be logged in to leave comments.
Login now