mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-14 03:20:14 +01:00
Fix for environments where Crypto and pyaes are installed. (#151)
If both Crypto and pyaes are installed 'pyaes' is in sys.modules(), but as it is not imported (see top) it's not available. Fix for #128
This commit is contained in:
parent
00cc79daee
commit
26109aac67
@ -167,7 +167,7 @@ class device:
|
|||||||
self.type = "Unknown"
|
self.type = "Unknown"
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
if 'pyaes' in sys.modules:
|
if 'pyaes' in globals():
|
||||||
self.encrypt = self.encrypt_pyaes
|
self.encrypt = self.encrypt_pyaes
|
||||||
self.decrypt = self.decrypt_pyaes
|
self.decrypt = self.decrypt_pyaes
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user