From a900a0582f94ffa11c622f3bd845c1896a22453a Mon Sep 17 00:00:00 2001 From: allfro Date: Mon, 9 May 2022 17:03:00 -0400 Subject: [PATCH] Update rq.py Fixes return type inconsistency with the `pack_value` for class `Object`. When using an `Object` field embedded in a request `pack_value` croaks because it calls to_binary which returns a byte buffer instead of a 3-value tuple. This fix addresses the issue. --- Xlib/protocol/rq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xlib/protocol/rq.py b/Xlib/protocol/rq.py index 86cb2def..8a0cd6b0 100644 --- a/Xlib/protocol/rq.py +++ b/Xlib/protocol/rq.py @@ -604,7 +604,8 @@ def parse_value(self, val, display): return self.type.parse_value(val, display) def pack_value(self, val): - return self.type.pack_value(val) + val = self.type.pack_value(val) + return val, len(val), None def check_value(self, val): if isinstance(val, tuple):