fix Python updateprogress()#925
Closed
smlng wants to merge 2 commits intoOctopusDeploy:masterfrom
Closed
Conversation
Documentation and code suggest that message is optional to updateprogress. However, when not providing a message to updateprogress it fails with an error from encode() as message is None. This is fixed here, by using an empty string as default for message instead of None.
Author
|
Ping, just some minor changes. Do I need to do something to move this forward. |
Closed
Collaborator
|
Thanks for the PR @smlng. I've created a fresh branch and PR, as our build scripts are exposed within this repository we do not automatically build community pull requests and have to trigger them manually. Some new security measures internally have prevented us from manually triggering these, and I'm waiting for confirmation whether I can. In the meantime, I've branched off of your changes and created a fresh pull request. I'll take a look at the changes early next week and see if we can get them merged in. Thanks again for the contribution! |
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.
According to the documentation the message for updateprogress in Python scripts is optional. However, when a message is not provided the script fails because the default for message is None which is then passed to the inner encode() function that does not like None.
In this fix the default value for message is changed from None to "" (empty string). Further this PR provided necessary test fixtures to assert the correct behavior.