Skip to content

qa: Fix python TypeError in script.py#12475

Merged
laanwj merged 1 commit intobitcoin:masterfrom
maflcko:Mf1802-qaPythonSyntax
Mar 5, 2018
Merged

qa: Fix python TypeError in script.py#12475
laanwj merged 1 commit intobitcoin:masterfrom
maflcko:Mf1802-qaPythonSyntax

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Feb 18, 2018

__repr__ returns string, so don't mix it with byte strings.

This fixes

TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

@maflcko maflcko added the Tests label Feb 18, 2018
@conscott
Copy link
Contributor

ACK fa82cacf601acf7f92b51a6f870cb4f6bbfe92db

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

Is this comment above now out of date? "For Python3 compatibility add b before strings so testcases don't need to change"

@maflcko maflcko force-pushed the Mf1802-qaPythonSyntax branch from fa82cac to fabc123 Compare February 19, 2018 04:40
@maflcko maflcko force-pushed the Mf1802-qaPythonSyntax branch from fabc123 to fa41d68 Compare February 19, 2018 04:42
@maflcko
Copy link
Member Author

maflcko commented Feb 19, 2018 via email

@fanquake
Copy link
Member

utACK fa41d68

@laanwj
Copy link
Member

laanwj commented Mar 5, 2018

utACK fa41d68

@laanwj laanwj merged commit fa41d68 into bitcoin:master Mar 5, 2018
laanwj added a commit that referenced this pull request Mar 5, 2018
fa41d68 qa: Fix python TypeError in script.py (MarcoFalke)

Pull request description:

  `__repr__` returns string, so don't mix it with byte strings.

  This fixes

  ```
  TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

Tree-SHA512: fac06e083f245209bc8a36102217580b0f6186842f4e52a686225111b0b96ff93c301640ff5e7ddef6a5b4f1689071b16a9a8dc80f28e2b060ddee29edd24ec7
@maflcko maflcko deleted the Mf1802-qaPythonSyntax branch March 14, 2018 01:33
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Apr 20, 2018
HashUnlimited pushed a commit to chaincoin/chaincoin that referenced this pull request May 13, 2018
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Mar 24, 2020
fa41d68 qa: Fix python TypeError in script.py (MarcoFalke)

Pull request description:

  `__repr__` returns string, so don't mix it with byte strings.

  This fixes

  ```
  TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

Tree-SHA512: fac06e083f245209bc8a36102217580b0f6186842f4e52a686225111b0b96ff93c301640ff5e7ddef6a5b4f1689071b16a9a8dc80f28e2b060ddee29edd24ec7
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants