mirror of
https://github.com/cmur2/python-bme680.git
synced 2024-12-22 22:54:29 +01:00
added check on constants.__dict__ for micropython support (#18)
* added check on constants.__dict__ for micropython support
This commit is contained in:
parent
e97c5f9241
commit
e827e5d622
@ -10,6 +10,7 @@ __version__ = '1.0.5'
|
|||||||
|
|
||||||
# Export constants to global namespace
|
# Export constants to global namespace
|
||||||
# so end-users can "from BME680 import NAME"
|
# so end-users can "from BME680 import NAME"
|
||||||
|
if hasattr(constants, '__dict__'):
|
||||||
for key in constants.__dict__:
|
for key in constants.__dict__:
|
||||||
value = constants.__dict__[key]
|
value = constants.__dict__[key]
|
||||||
if key not in globals():
|
if key not in globals():
|
||||||
|
Loading…
Reference in New Issue
Block a user