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

lint: Make sure we read the command line inputs using utf-8 decoding in python #14128

Merged
merged 1 commit into from Sep 4, 2018

Conversation

Projects
None yet
5 participants
@ken2812221
Copy link
Member

commented Sep 1, 2018

Make sure we read the command line inputs using utf-8 decoding in python

occurred from travis cron job:

contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)

@laanwj laanwj added the Tests label Sep 1, 2018

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 1, 2018

I think it would be better to fix the .py script to always read as utf-8, this should be independent of the system locale

(we've done this for the other ones)
apparently this was the intent here too:

    revsig_allowed = open(dirname + "/allow-revsig-commits", "r", encoding="utf-8").read().splitlines()
    unclean_merge_allowed = open(dirname + "/allow-unclean-merge-commits", "r", encoding="utf-8").read().splitlines()
    incorrect_sha512_allowed = open(dirname + "/allow-incorrect-sha512-commits", "r", encoding="utf-8").read().splitlines()

Do you know where it fails?

@ken2812221 ken2812221 force-pushed the ken2812221:travis-cron-fix branch 2 times, most recently Sep 1, 2018

@ken2812221

This comment has been minimized.

Copy link
Member Author

commented Sep 1, 2018

Do you know where it fails?

It is check_output

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Sep 1, 2018

No more conflicts as of last run.

@ken2812221 ken2812221 force-pushed the ken2812221:travis-cron-fix branch 3 times, most recently Sep 1, 2018

@fanquake

This comment has been minimized.

Copy link
Member

commented Sep 2, 2018

concept ACK

@ken2812221 Can you update the commit message, PR title and description to match the current changes.

@ken2812221 ken2812221 force-pushed the ken2812221:travis-cron-fix branch to 5d62dcf Sep 2, 2018

@ken2812221 ken2812221 changed the title travis: Fix cron job fail lint: Make sure we read the command line inputs using utf-8 decoding in python Sep 2, 2018

@ken2812221

This comment has been minimized.

Copy link
Member Author

commented Sep 2, 2018

@fanquake Thanks, updated

@practicalswift

This comment has been minimized.

Copy link
Member

commented Sep 2, 2018

utACK 5d62dcf

Nice linter improvement!

@fanquake

This comment has been minimized.

Copy link
Member

commented Sep 2, 2018

@ken2812221 Thanks, utACK 5d62dcf.

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 4, 2018

thanks!
utACK 5d62dcf

@laanwj laanwj merged commit 5d62dcf into bitcoin:master Sep 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Sep 4, 2018

Merge #14128: lint: Make sure we read the command line inputs using u…
…tf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

@ken2812221 ken2812221 deleted the ken2812221:travis-cron-fix branch Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.