From 7a550545e717dd6986f188b3fbe503b2528f75a5 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Thu, 9 Dec 2010 12:54:30 +0000 Subject: [PATCH] Add support for None in values (unknown size at the moment). git-svn-id: https://svn.erp5.org/repos/neo/trunk@2482 71dcc9de-d417-0410-9af5-da40c76e7ee4 --- neo/client/mq.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neo/client/mq.py b/neo/client/mq.py index dee75cb1..4bfc0a58 100644 --- a/neo/client/mq.py +++ b/neo/client/mq.py @@ -110,6 +110,9 @@ def sizeof(o): """This function returns the estimated size of an object.""" if isinstance(o, tuple): return sum((sizeof(s) for s in o)) + elif o is None: + # XXX: unknown size (arch pointer ?) + return 0 else: return len(o)+16 -- 2.30.9