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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue