##// END OF EJS Templates
Fix docstring, validate JSON on PUT
Thomas Kluyver -
Show More
@@ -1,4 +1,4 b''
1 """Tornado handlers for kernel specifications."""
1 """Tornado handlers for frontend config storage."""
2
2
3 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
4 # Distributed under the terms of the Modified BSD License.
@@ -30,6 +30,7 b' class ConfigHandler(IPythonHandler):'
30 @web.authenticated
30 @web.authenticated
31 @json_errors
31 @json_errors
32 def put(self, section_name):
32 def put(self, section_name):
33 self.get_json_body() # Will raise 400 if content is not valid JSON
33 filename = self.file_name(section_name)
34 filename = self.file_name(section_name)
34 with open(filename, 'wb') as f:
35 with open(filename, 'wb') as f:
35 f.write(self.request.body)
36 f.write(self.request.body)
General Comments 0
You need to be logged in to leave comments. Login now