Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default_config command #2911

Merged
merged 2 commits into from Oct 23, 2017
Merged

Add a default_config command #2911

merged 2 commits into from Oct 23, 2017

Conversation

@ralsina
Copy link
Member

@ralsina ralsina commented Oct 23, 2017

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

Copy link
Member

@Kwpolska Kwpolska left a comment

LGTM but has one glitch.

import nikola.plugins.command.init

try:
print(nikola.plugins.command.init.CommandInit.create_configuration_to_string())
Copy link
Member

@Kwpolska Kwpolska Oct 23, 2017

I don’t think that was intended.

Copy link
Member Author

@ralsina ralsina Oct 23, 2017

It sure was not. Silly copypasta.


doc_usage = ""
needs_config = False
doc_purpose = "print the default Nikola configuration."
Copy link
Member

@Kwpolska Kwpolska Oct 23, 2017

(Style: uppercase P)

Copy link
Member Author

@ralsina ralsina Oct 23, 2017

Will fix.

"""Show the default configuration."""
try:
print(nikola.plugins.command.init.CommandInit.create_configuration_to_string())
except:
Copy link
Member

@Kwpolska Kwpolska Oct 23, 2017

Do except Exception:, it’s nicer in production code.

Copy link
Member Author

@ralsina ralsina Oct 23, 2017

Will do.

@ralsina ralsina merged commit 12c053f into master Oct 23, 2017
2 of 4 checks passed
@ralsina ralsina deleted the show-clean-config branch Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants