Skip to content

Commit 7756832

Browse files
author
James William Pye
committed
Make sure it's a bytes() object.
via Elvis
1 parent 9b9a1aa commit 7756832

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

postgresql/protocol/typio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ def circle_unpack(x):
269269

270270
def uuid_pack(x):
271271
if isinstance(x, uuid.UUID):
272-
return x.bytes
273-
return uuid.UUID(x).bytes
272+
return bytes(x.bytes)
273+
return bytes(uuid.UUID(x).bytes)
274274
def uuid_unpack(x):
275275
return uuid.UUID(bytes=x)
276276

0 commit comments

Comments
 (0)