mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +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 logging
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from six import text_type
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -655,7 +656,7 @@ class JupyterHubApp(Application):
|
|||||||
if answer.startswith('n'):
|
if answer.startswith('n'):
|
||||||
return
|
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)
|
print("Writing default config to: %s" % self.config_file)
|
||||||
with io.open(self.config_file, encoding='utf8', mode='w') as f:
|
with io.open(self.config_file, encoding='utf8', mode='w') as f:
|
||||||
f.write(config_text)
|
f.write(config_text)
|
||||||
|
@@ -4,3 +4,4 @@ jinja2
|
|||||||
simplepam
|
simplepam
|
||||||
sqlalchemy
|
sqlalchemy
|
||||||
requests
|
requests
|
||||||
|
six
|
||||||
|
Reference in New Issue
Block a user