[ZODB-Dev] ZEO pack

Steve Alexander steve@cat-box.net
Wed, 26 Sep 2001 15:38:00 +0100


Greg Ward wrote:

> 
> But I don't see a way to add 'wait' to the BaseStorage.pack() interface
> without breaking any third-party storages.  ;-(


try:
   storage.pack(t, wait=1)
except TypeError:
   storage.pack(t)

Or:

pack=storage.pack
if 'wait' in pack.func_code.co_varnames:
   pack(t, wait=1)
else:
   pack(t)

--
Steve Alexander
Software Engineer
Cat-Box limited