Skip to content

Commit

Permalink
Fix #3094 — don’t try to print a bytestring in default_config
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 16, 2018
1 parent 5ef28cb commit 2e8d56c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/plugins/command/default_config.py
Expand Up @@ -29,6 +29,7 @@
from nikola.plugin_categories import Command
from nikola.utils import get_logger
import nikola.plugins.command.init
import sys


LOGGER = get_logger('default_config')
Expand All @@ -49,4 +50,4 @@ def _execute(self, options=None, args=None):
try:
print(nikola.plugins.command.init.CommandInit.create_configuration_to_string())
except Exception:
print(nikola.plugins.command.init.CommandInit.create_configuration_to_string().encode('utf-8'))
sys.stdout.buffer.write(nikola.plugins.command.init.CommandInit.create_configuration_to_string().encode('utf-8'))

0 comments on commit 2e8d56c

Please sign in to comment.