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:
Wladimir J. van der Laan 2018-07-18 14:50:56 +02:00
commit 4c6d1b9973
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ import signal
import struct import struct
import sys 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") print("This example only works with Python 3.5 and greater")
sys.exit(1) sys.exit(1)

View file

@ -34,7 +34,7 @@ import signal
import struct import struct
import sys 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") print("This example only works with Python 3.4 and greater")
sys.exit(1) sys.exit(1)