Merge pull request #34 from dhalbert/check-cpy-version

Complain if trying to use with CPy 4.x
This commit is contained in:
Scott Shawcroft 2019-11-19 11:43:38 -08:00 committed by GitHub
commit 795dd520f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,12 @@ Implementation Notes
https://github.com/adafruit/circuitpython/releases
"""
#pylint: disable=wrong-import-position
import sys
if sys.implementation.name == 'circuitpython' and sys.implementation.version[0] <= 4:
raise ImportError(
"This release is not compatible with CircuitPython 4.x; use library release 1.x.x")
#pylint: enable=wrong-import-position
import board
import _bleio