about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--broadlink/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py
index 592acf4f86d0..e9c1307d8104 100644
--- a/broadlink/__init__.py
+++ b/broadlink/__init__.py
@@ -167,7 +167,7 @@ class device:
     self.type = "Unknown"
     self.lock = threading.Lock()
 
-    if 'pyaes' in sys.modules:
+    if 'pyaes' in globals():
         self.encrypt = self.encrypt_pyaes
         self.decrypt = self.decrypt_pyaes
     else: