##// END OF EJS Templates
drop more 2.6 hacks
Matthias Bussonnier -
Show More
@@ -137,15 +137,7 b' class NotebookWebApplication(web.Application):'
137 cluster_manager, session_manager, kernel_spec_manager,
137 cluster_manager, session_manager, kernel_spec_manager,
138 log, base_url, default_url, settings_overrides,
138 log, base_url, default_url, settings_overrides,
139 jinja_env_options=None):
139 jinja_env_options=None):
140 # Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and
140
141 # base_url will always be unicode, which will in turn
142 # make the patterns unicode, and ultimately result in unicode
143 # keys in kwargs to handler._execute(**kwargs) in tornado.
144 # This enforces that base_url be ascii in that situation.
145 #
146 # Note that the URLs these patterns check against are escaped,
147 # and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.
148 base_url = py3compat.unicode_to_str(base_url, 'ascii')
149 _template_path = settings_overrides.get("template_path", os.path.join(os.path.dirname(__file__), "templates"))
141 _template_path = settings_overrides.get("template_path", os.path.join(os.path.dirname(__file__), "templates"))
150 if isinstance(_template_path, str):
142 if isinstance(_template_path, str):
151 _template_path = (_template_path,)
143 _template_path = (_template_path,)
General Comments 0
You need to be logged in to leave comments. Login now