about summary refs log tree commit diff
path: root/broadlink/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'broadlink/__init__.py')
-rw-r--r--broadlink/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py
index 49309c21f12f..ede6c3129ae6 100644
--- a/broadlink/__init__.py
+++ b/broadlink/__init__.py
@@ -265,7 +265,7 @@ class device:
 
         # pad the payload for AES encryption
         if payload:
-            payload += bytearray(16 - len(payload)%16)
+            payload += bytearray((16 - len(payload)) % 16)
 
         checksum = adler32(payload, 0xbeaf) & 0xffff
         packet[0x34] = checksum & 0xff