X Tutup
Skip to content

donate_cpu_lib: Fix python 3 crash if fail to get package#2445

Merged
danmar merged 2 commits intodanmar:masterfrom
rikardfalkeborn:donate_cpu_lib-fix-python-3-crash-if-fail-to-get-package
Dec 12, 2019
Merged

donate_cpu_lib: Fix python 3 crash if fail to get package#2445
danmar merged 2 commits intodanmar:masterfrom
rikardfalkeborn:donate_cpu_lib-fix-python-3-crash-if-fail-to-get-package

Conversation

@rikardfalkeborn
Copy link
Copy Markdown
Contributor

Decoding a string is not allowed in python 3 (in python 2 it works).
If fetching the package fails, assign an empty byte string instead to
avoid crashing.

When this happes, previously there was a crash of the running script.
Now it will cause donate_cpu do wait 30 seconds before retrying, while
test-my-pr will exit cleanly. I saw this when trying to run test-my-pr
(more than once), probably due to shaky connection, perhaps test-my-pr
should also wait and retry at least a couple of times before exiting?

Decoding a string is not allowed in python 3 (in python 2 it works).
If fetching the package fails, assign an empty byte string instead to
avoid crashing.
Copy link
Copy Markdown
Contributor Author

@rikardfalkeborn rikardfalkeborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this should just initialize package to b'' at line 132 instead.

@danmar
Copy link
Copy Markdown
Owner

danmar commented Dec 12, 2019

sounds good.

@danmar danmar merged commit 3ff4d83 into danmar:master Dec 12, 2019
@rikardfalkeborn rikardfalkeborn deleted the donate_cpu_lib-fix-python-3-crash-if-fail-to-get-package branch December 12, 2019 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup