mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
BUG: Fix unicode/str error when generating config file.
This commit is contained in:
@@ -9,6 +9,7 @@ import io
|
||||
import logging
|
||||
import os
|
||||
from datetime import datetime
|
||||
from six import text_type
|
||||
from subprocess import Popen
|
||||
|
||||
try:
|
||||
@@ -654,8 +655,8 @@ class JupyterHubApp(Application):
|
||||
answer = ask()
|
||||
if answer.startswith('n'):
|
||||
return
|
||||
|
||||
config_text = self.generate_config_file()
|
||||
|
||||
config_text = text_type(self.generate_config_file(), 'utf8')
|
||||
print("Writing default config to: %s" % self.config_file)
|
||||
with io.open(self.config_file, encoding='utf8', mode='w') as f:
|
||||
f.write(config_text)
|
||||
|
Reference in New Issue
Block a user