]> granicus.if.org Git - handbrake/commit
Fix Py3 compat and logic/syntax in handling version.txt
authorFrederick Ding <frederick@frederickding.com>
Wed, 27 Feb 2019 22:09:24 +0000 (22:09 +0000)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 28 Feb 2019 14:25:07 +0000 (06:25 -0800)
commit22ee1a38eac473ce81d487f88ca58382abbaa0cb
treef6a7930c666b39c5b1776609a83d41e4d74ee50b
parentf60354ef7ece3c69a0c6e83021778c28270b2880
Fix Py3 compat and logic/syntax in handling version.txt

The first fix addresses the problem that readlines() gives back a
list of strings, which do not have the `.decode()` method that bytes do.
But `_parseSession()` is used both for the bytes output by running
`repo-info.sh` and for the strings output by ingesting `version.txt`.
So we still need to handle the bytes case.

The second fix addresses syntax and logic problems. If a string is
not empty, `if self.hash` will check that it's non-empty (I don't think
`is not empty` actually works -- it has given me a NameError). And the
string comparison should be done by value equality, not reference
equality.
make/configure.py