diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-18 14:50:56 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-18 14:51:12 +0200 |
commit | 4c6d1b9973c9b2e839c557b548007270dd789445 (patch) | |
tree | 4d2939ef9b5ecbd383ed6f314f0606b8ae321716 /contrib | |
parent | f5d166acf90902bc7d2b020e82d99e7947720570 (diff) | |
parent | 066d2973a6fff0bf494c4a0000218fe72983808b (diff) |
Merge #13699: contrib: correct version check
066d2973a6fff0bf494c4a0000218fe72983808b 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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/zmq/zmq_sub.py | 2 | ||||
-rw-r--r-- | contrib/zmq/zmq_sub3.4.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py index 60768dc59a..fa9e669308 100644 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -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) diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py index 0df843c9a3..d05ecc2623 100644 --- a/contrib/zmq/zmq_sub3.4.py +++ b/contrib/zmq/zmq_sub3.4.py @@ -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) |