diff options
| author | 2024-04-23 00:38:24 -0400 | |
|---|---|---|
| committer | 2024-04-23 00:38:24 -0400 | |
| commit | 0199f695e93782d728bd31857afe54f4df92f351 (patch) | |
| tree | 34e9030a05a89461d222172615c74891fba1e5ef /nikola/plugins/command/default_config.py | |
| parent | 22b8f5dae59e876643e8e3002f72282f3e8608c5 (diff) | |
| parent | 9b0e86a8e74768c4fe848fb5ce8d754292db4e3e (diff) | |
Update upstream source from tag 'upstream/8.3.0'
Update to upstream version '8.3.0'
with Debian dir bc13791b86ab63e4473e92288f1749c55a6ad540
Diffstat (limited to 'nikola/plugins/command/default_config.py')
| -rw-r--r-- | nikola/plugins/command/default_config.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nikola/plugins/command/default_config.py b/nikola/plugins/command/default_config.py index fddda26..f14c4c8 100644 --- a/nikola/plugins/command/default_config.py +++ b/nikola/plugins/command/default_config.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2022 Roberto Alsina and others. +# Copyright © 2012-2024 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -48,7 +48,10 @@ class CommandShowConfig(Command): def _execute(self, options=None, args=None): """Show the default configuration.""" + init_plugin = self.site.plugin_manager.get_plugin_by_name("init", "Command").plugin_object + config = init_plugin.create_configuration_to_string() + try: - print(nikola.plugins.command.init.CommandInit.create_configuration_to_string()) + print(config) except Exception: - sys.stdout.buffer.write(nikola.plugins.command.init.CommandInit.create_configuration_to_string().encode('utf-8')) + sys.stdout.buffer.write(config.encode('utf-8')) |
