Merge #13699: contrib: correct version check
066d2973a6
contrib: correct version check (Karl-Johan Alm)
Pull request description:
[ not(major >= 3 and minor >= 4) ] fails for '4.0':
```Python
>>> major=4
>>> minor=0
>>> if not (major >= 3 and minor >= 5):
... print('This example only works with Python 3.5 and greater')
...
This example only works with Python 3.5 and greater
```
Tree-SHA512: 41cb8c5dabe0061ead37b0d6447b699c5d5e1a5551a75dd279bb2ec6d6afa51f8b27a48e01195093db7ec37b28ff6445d59646a4a2b6dcee37776afb60eac8dc
This commit is contained in:
commit
4c6d1b9973
2 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ import signal
|
|||
import struct
|
||||
import sys
|
||||
|
||||
if not (sys.version_info.major >= 3 and sys.version_info.minor >= 5):
|
||||
if (sys.version_info.major, sys.version_info.minor) < (3, 5):
|
||||
print("This example only works with Python 3.5 and greater")
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import signal
|
|||
import struct
|
||||
import sys
|
||||
|
||||
if not (sys.version_info.major >= 3 and sys.version_info.minor >= 4):
|
||||
if (sys.version_info.major, sys.version_info.minor) < (3, 4):
|
||||
print("This example only works with Python 3.4 and greater")
|
||||
sys.exit(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue