From 0f3afc49b40a459947da9c45dc8f715b896f75a1 Mon Sep 17 00:00:00 2001 From: eir Date: Sat, 21 Mar 2020 05:49:07 -0700 Subject: [PATCH] spin_device/writeCommand: Fix assert logic --- stspin/spin_device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stspin/spin_device.py b/stspin/spin_device.py index 8b75d09..b3b7b1a 100644 --- a/stspin/spin_device.py +++ b/stspin/spin_device.py @@ -91,7 +91,7 @@ def _writeCommand( :return: Response bytes as int """ # payload and payload_size must be either both present, or both absent - assert((payload is None) != (payload_size is None)) + assert((payload is None) == (payload_size is None)) response = self._write(command)