Conversation
kpengboy
reviewed
Jun 8, 2019
Member
kpengboy
left a comment
There was a problem hiding this comment.
Thanks for working on this. I have left comments.
For a bonus, we could perhaps colorize some of the text.
|
|
||
| condition = iq['error']['condition'] | ||
| errtext = iq['error']['text'] | ||
| raise Exception('{}: {}'.format(condition, errtext)) |
Member
There was a problem hiding this comment.
Can we use a more specific subclass of Exception?
Member
Author
There was a problem hiding this comment.
I don't think this is a huge deal, since this is only seen by the emailed problem report in the root@ mailing list. We'll see the line number which is more important anyways.
Member
Author
|
Thanks for the feedback, I've made most of the suggested changes. Not opposed to colorized output but I'd rather do it in a separate commit, and it's not a huge priority IMO. |
kpengboy
approved these changes
Jun 16, 2019
Co-authored-by: Kevin Peng <kpengboy@ocf.berkeley.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lets users create their own XMPP accounts. The script might seem daunting but it's actually not as complicated as it seems. It connects as the XMPP admin and attempts to change the user's password. If that errors, it then tries to create the account. This relies on sudo rules in ocf/puppet#659.