Commit 80470838 authored by Jeremy Hylton's avatar Jeremy Hylton

Allow read-only client connections to call pack().

Not sure about this judgement call.  It is really convenient to be
able to pack a ZEO server, even if it is only accepting read-only
connections.  Is pack() a write operation?  At one level: Yes, it
modifies the data.fs.  But it doesn't modify current objects, so it
isn't the same as calling store().

We can revisit this later if it ends up being a problem for someone.
parent d3005d4d
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Network ZODB storage client """Network ZODB storage client
$Id: ClientStorage.py,v 1.44 2002/08/14 19:46:28 jeremy Exp $ $Id: ClientStorage.py,v 1.45 2002/08/14 20:44:28 jeremy Exp $
""" """
import cPickle import cPickle
...@@ -290,8 +290,7 @@ class ClientStorage: ...@@ -290,8 +290,7 @@ class ClientStorage:
return oid return oid
def pack(self, t=None, rf=None, wait=0, days=0): def pack(self, t=None, rf=None, wait=0, days=0):
if self._is_read_only: # XXX Is it okay that read-only connections allow pack()?
raise POSException.ReadOnlyError()
# rf argument ignored; server will provide it's own implementation # rf argument ignored; server will provide it's own implementation
if t is None: if t is None:
t = time.time() t = time.time()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment