Closed mckinly closed 3 years ago
Issue with patch versions as noted in Issue 221 filed by @gassan It appears this line was never getting hit, because 0 is falsy in python (see here).
0
Instead of evaluating if VERSION[2]: I updated it to if VERSION[2] is not None
if VERSION[2]:
if VERSION[2] is not None
I added 2 unit tests to ensure a 0 patch version and anything greater than 0 is handled.
@gassan @danirus Here's my PR. I'm happy to receive any feedback and make any suggested changes!
Problem
Issue with patch versions as noted in Issue 221 filed by @gassan It appears this line was never getting hit, because
0
is falsy in python (see here).Solution
Instead of evaluating
if VERSION[2]:
I updated it toif VERSION[2] is not None
Testing
I added 2 unit tests to ensure a
0
patch version and anything greater than0
is handled.