[Zodb-checkins] CVS: ZEO/ZEO - ClientCache.py:1.18.6.4 ClientStorage.py:1.35.6.6 ClientStub.py:1.3.2.3 Invalidator.py:1.6.6.2 ServerStub.py:1.3.2.3 StorageServer.py:1.32.6.6 TransactionBuffer.py:1.3.2.3 asyncwrap.py:1.2.4.2 fap.py:1.5.6.2 smac.py:1.11.4.5 start.py:1.26.4.3 trigger.py:1.3.4.3 zrpc.py:1.20.4.2
Tim Peters
tim.one@home.com
Sat, 26 Jan 2002 13:04:21 -0500
Update of /cvs-repository/ZEO/ZEO
In directory cvs.zope.org:/tmp/cvs-serv28311
Modified Files:
Tag: Standby-branch
ClientCache.py ClientStorage.py ClientStub.py Invalidator.py
ServerStub.py StorageServer.py TransactionBuffer.py
asyncwrap.py fap.py smac.py start.py trigger.py zrpc.py
Log Message:
Whitespace normalization.
=== ZEO/ZEO/ClientCache.py 1.18.6.3 => 1.18.6.4 ===
-#
+#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
-#
+#
# Copyright (c) Digital Creations. All rights reserved.
-#
+#
# This license has been certified as Open Source(tm).
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
-#
+#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
@@ -26,43 +26,43 @@
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
-#
+#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
-#
+#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
-#
+#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
-#
+#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
-#
-#
+#
+#
# Disclaimer
-#
+#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,15 +75,15 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-#
-#
+#
+#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
-#
+#
##############################################################################
"""Implement a client cache
-
+
The cache is managed as two files, var/c0.zec and var/c1.zec.
Each cache file is a sequence of records of the form:
@@ -195,7 +195,7 @@
# If we found a non-zero serial, then use the file
if s[i] != '\0\0\0\0\0\0\0\0': f[i]=fi
fi=None
-
+
# Whoever has the larger serial is the current
if s[1] > s[0]: current=1
elif s[0] > s[1]: current=0
@@ -220,7 +220,7 @@
def open(self):
# XXX open is overloaded to perform two tasks for
- # optimization reasons
+ # optimization reasons
self._acquire()
try:
self._index=index={}
@@ -284,11 +284,11 @@
del self._index[oid]
return None
- if h[8]=='n':
+ if h[8]=='n':
if version: return None
if not dlen:
del self._index[oid]
- return None
+ return None
if not vlen or not version:
if dlen: return read(dlen), h[19:]
@@ -332,7 +332,7 @@
if dlen:
p=read(dlen)
s=h[19:]
- else:
+ else:
return self._store(oid, '', '', version, data, serial)
self._store(oid, p, s, version, data, serial)
@@ -390,7 +390,7 @@
self._f[current].write(magic)
self._pos=pos=4
finally: self._release()
-
+
def store(self, oid, p, s, version, pv, sv):
self._acquire()
@@ -416,7 +416,7 @@
if p:
l.append(p)
if version:
- l.extend([version,
+ l.extend([version,
pack(">I", len(pv)),
pv, sv])
l.append(stlen)
@@ -441,7 +441,7 @@
while 1:
f.seek(pos)
h=read(27)
-
+
if len(h)==27 and h[8] in 'vni':
tlen, vlen, dlen = unpack(">iHi", h[9:19])
else: tlen=-1
@@ -470,12 +470,12 @@
# We have a record for this oid, but it was invalidated!
del serial[oid]
del index[oid]
-
-
+
+
pos=pos+tlen
f.seek(pos)
try: f.truncate()
except: pass
-
+
return pos
=== ZEO/ZEO/ClientStorage.py 1.35.6.5 => 1.35.6.6 ===
-#
+#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
-#
+#
# Copyright (c) Digital Creations. All rights reserved.
-#
+#
# This license has been certified as Open Source(tm).
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
-#
+#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
@@ -26,43 +26,43 @@
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
-#
+#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
-#
+#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
-#
+#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
-#
+#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
-#
-#
+#
+#
# Disclaimer
-#
+#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,12 +75,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-#
-#
+#
+#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
-#
+#
##############################################################################
"""Network ZODB storage client
"""
@@ -192,7 +192,7 @@
# Prevent multiple new_oid calls from going out. The _oids
# variable should only be modified while holding the
- # oid_cond.
+ # oid_cond.
self.oid_cond = threading.Condition()
commit_lock = threading.Lock()
@@ -207,7 +207,7 @@
self._rpc_mgr.close()
if self._cache is not None:
self._cache.close()
-
+
def registerDB(self, db, limit):
"""Register that the storage is controlled by the given DB."""
log2(INFO, "registerDB(%s, %s)" % (repr(db), repr(limit)))
@@ -263,10 +263,10 @@
def getSize(self):
return self._info['size']
-
+
def supportsUndo(self):
return self._info['supportsUndo']
-
+
def supportsVersions(self):
return self._info['supportsVersions']
@@ -286,7 +286,7 @@
else:
raise exc(self._transaction, trans)
return 1
-
+
def _check_tid(self, tid, exc=None):
if self.tpc_tid != tid:
if exc is None:
@@ -309,7 +309,7 @@
self._rpc_mgr.close()
if self._cache is not None:
self._cache.close()
-
+
def commitVersion(self, src, dest, transaction):
if self._is_read_only:
raise POSException.ReadOnlyError()
@@ -327,10 +327,10 @@
return oids
def history(self, oid, version, length=1):
- return self._server.history(oid, version, length)
-
+ return self._server.history(oid, version, length)
+
def loadSerial(self, oid, serial):
- return self._server.loadSerial(oid, serial)
+ return self._server.loadSerial(oid, serial)
def load(self, oid, version, _stuff=None):
p = self._cache.load(oid, version)
@@ -347,7 +347,7 @@
if s:
return p, s
raise KeyError, oid # no non-version data for this
-
+
def modifiedInVersion(self, oid):
v = self._cache.modifiedInVersion(oid)
if v is not None:
@@ -366,7 +366,7 @@
oid = self._oids.pop()
self.oid_cond.release()
return oid
-
+
def pack(self, t=None, rf=None, wait=0, days=0):
if self._is_read_only:
raise POSException.ReadOnlyError()
@@ -391,7 +391,7 @@
if self._is_read_only:
raise POSException.ReadOnlyError()
self._check_trans(transaction, POSException.StorageTransactionError)
- self._server.storea(oid, serial, data, version, self._serial)
+ self._server.storea(oid, serial, data, version, self._serial)
self._tbuf.store(oid, version, data)
return self._check_serials()
@@ -400,7 +400,7 @@
return
self._server.vote(self._serial)
return self._check_serials()
-
+
def tpc_abort(self, transaction):
if transaction is not self._transaction:
return
@@ -423,7 +423,7 @@
if self._server is None:
self.tpc_cond.release()
raise ClientDisconnected()
-
+
self._ts = get_timestamp(self._ts)
id = `self._ts`
self._transaction = transaction
@@ -464,7 +464,7 @@
def _update_cache(self):
# Iterate over the objects in the transaction buffer and
- # update or invalidate the cache.
+ # update or invalidate the cache.
self._cache.checkSize(self._tbuf.get_size())
self._tbuf.begin_iterate()
while 1:
@@ -477,7 +477,7 @@
if t is None:
break
oid, v, p = t
- if p is None: # an invalidation
+ if p is None: # an invalidation
s = None
else:
s = self._seriald[oid]
@@ -502,7 +502,7 @@
# XXX what are the sync issues here?
oids = self._server.undo(transaction_id)
for oid in oids:
- self._cache.invalidate(oid, '')
+ self._cache.invalidate(oid, '')
return oids
def undoInfo(self, first=0, last=-20, specification=None):
@@ -511,7 +511,7 @@
def undoLog(self, first, last, filter=None):
if filter is not None:
return () # can't pass a filter to server
-
+
return self._server.undoLog(first, last) # Eek!
def versionEmpty(self, version):
=== ZEO/ZEO/ClientStub.py 1.3.2.2 => 1.3.2.3 ===
def __init__(self, rpc):
self.rpc = rpc
-
+
def beginVerify(self):
self.rpc.callAsync('begin')
=== ZEO/ZEO/Invalidator.py 1.6.6.1 => 1.6.6.2 ===
_d=None
-
+
def __init__(self, dinvalidate, cinvalidate):
self.dinvalidate=dinvalidate
self.cinvalidate=cinvalidate
=== ZEO/ZEO/ServerStub.py 1.3.2.2 => 1.3.2.3 ===
else:
return self.rpc.call('new_oids', n)
-
+
def pack(self, t, wait=None):
if wait is None:
self.rpc.call('pack', t)
@@ -58,7 +58,7 @@
def commitVersion(self, src, dest, id):
return self.rpc.call('commitVersion', src, dest, id)
-
+
def history(self, oid, version, length=None):
if length is not None:
return self.rpc.call('history', oid, version)
@@ -104,5 +104,3 @@
return self.rpc.call('versions')
else:
return self.rpc.call('versions', max)
-
-
=== ZEO/ZEO/StorageServer.py 1.32.6.5 => 1.32.6.6 ===
-#
+#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
-#
+#
# Copyright (c) Digital Creations. All rights reserved.
-#
+#
# This license has been certified as Open Source(tm).
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
-#
+#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
@@ -26,33 +26,33 @@
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
-#
+#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
-#
+#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
-#
+#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
-#
+#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
@@ -60,9 +60,9 @@
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
#
-#
+#
# Disclaimer
-#
+#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,12 +75,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-#
-#
+#
+#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
-#
+#
##############################################################################
"""Network ZODB storage server
@@ -135,7 +135,7 @@
c = ManagedServerConnection(sock, addr, ZEOStorage(self), self)
log("new connection %s: %s" % (addr, `c`))
return c
-
+
def register(self, storage_id, proxy):
"""Register a connection's use with a particular storage.
@@ -188,7 +188,7 @@
def notifyConnected(self, conn):
self.client = ClientStub.ClientStorage(conn)
-
+
def __repr__(self):
tid = self._transaction and repr(self._transaction.id)
if self.__storage:
@@ -303,7 +303,7 @@
t.start()
def _pack(self, t, wait=0):
- try:
+ try:
self.__storage.pack(t, referencesf)
except:
self._log('ZEO Server', zLOG.ERROR,
@@ -380,7 +380,7 @@
def transactionalUndo(self, trans_id, id):
self._check_tid(id, exc=StorageTransactionError)
return self.__storage.transactionalUndo(trans_id, self._transaction)
-
+
def undo(self, transaction_id):
oids = self.__storage.undo(transaction_id)
if oids:
@@ -464,7 +464,7 @@
proxy._restart_delayed_transaction(delay, trans, tid, status)
if self is proxy:
return 1
-
+
def new_oids(self, n=100):
"""Return a sequence of n new oids, where n defaults to 100"""
if n < 0:
=== ZEO/ZEO/TransactionBuffer.py 1.3.2.2 => 1.3.2.3 ===
class TransactionBuffer:
-
+
def __init__(self):
self.file = tempfile.TemporaryFile()
self.count = 0
@@ -59,8 +59,8 @@
oid_ver_data = self.unpickler.load()
self.count -= 1
return oid_ver_data
-
+
def get_size(self):
"""Return size of data stored in buffer (just a hint)."""
-
+
return self.size
=== ZEO/ZEO/asyncwrap.py 1.2.4.1 => 1.2.4.2 ===
else:
break
-
+
def poll(*args, **kwargs):
try:
apply(asyncore.poll, args, kwargs)
=== ZEO/ZEO/fap.py 1.5.6.1 => 1.5.6.2 ===
except: return 0
else: return 1
-
+
def fap():
# if we are using an old version of Python, our asyncore is likely to
@@ -33,12 +33,12 @@
except:
# Try a little harder to import ZServer
import os, imp
-
+
location = package_home()
location = os.path.split(location)[0]
location = os.path.split(location)[0]
location = os.path.split(location)[0]
-
+
if whiff(location):
sys.path.append(location)
try:
=== ZEO/ZEO/smac.py 1.11.4.4 => 1.11.4.5 ===
-#
+#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
-#
+#
# Copyright (c) Digital Creations. All rights reserved.
-#
+#
# This license has been certified as Open Source(tm).
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
-#
+#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
@@ -26,43 +26,43 @@
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
-#
+#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
-#
+#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
-#
+#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
-#
+#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
-#
-#
+#
+#
# Disclaimer
-#
+#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,12 +75,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-#
-#
+#
+#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
-#
+#
##############################################################################
"""Sized message async connections
"""
@@ -198,7 +198,7 @@
def readable(self):
return 1
-
+
def writable(self):
if len(self.__output) == 0:
return 0
=== ZEO/ZEO/start.py 1.26.4.2 => 1.26.4.3 ===
-#
+#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
-#
+#
# Copyright (c) Digital Creations. All rights reserved.
-#
+#
# This license has been certified as Open Source(tm).
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
-#
+#
# 1. Redistributions in source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
-#
+#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
@@ -26,43 +26,43 @@
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
-#
+#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
-#
+#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
-#
+#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
-#
+#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
-#
+#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
-#
+#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
-#
-#
+#
+#
# Disclaimer
-#
+#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,12 +75,12 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-#
-#
+#
+#
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
-#
+#
##############################################################################
"""Start the server storage.
@@ -99,7 +99,7 @@
d=os.path.split(d)[0]
if not d or d=='.': d=os.getcwd()
n=n-1
-
+
return d
def get_storage(m, n, cache={}):
@@ -150,7 +150,7 @@
-D -- Run in debug mode
-U -- Unix-domain socket file to listen on
-
+
-u username or uid number
The username to run the ZEO server as. You may want to run
@@ -191,7 +191,7 @@
print usage
print msg
sys.exit(1)
-
+
port=None
debug=0
host=''
@@ -234,7 +234,7 @@
from zLOG import LOG, INFO, ERROR
# Try to set uid to "-u" -provided uid.
- # Try to set gid to "-u" user's primary group.
+ # Try to set gid to "-u" user's primary group.
# This will only work if this script is run by root.
try:
import pwd
@@ -249,7 +249,7 @@
uid = pwd.getpwuid(UID)[2]
gid = pwd.getpwuid(UID)[3]
else:
- raise KeyError
+ raise KeyError
try:
if gid is not None:
try:
@@ -355,7 +355,7 @@
"Shutting down (%s)" % (die and "shutdown" or "restart")
)
except: pass
-
+
if die: sys.exit(0)
else: sys.exit(1)
=== ZEO/ZEO/trigger.py 1.3.4.2 => 1.3.4.3 ===
import string
import thread
-
+
if os.name == 'posix':
class trigger (asyncore.file_dispatcher):
@@ -138,7 +138,7 @@
if port <= 19950:
raise 'Bind Error', 'Cannot bind trigger!'
port=port - 1
-
+
a.listen (1)
w.setblocking (0)
try:
=== ZEO/ZEO/zrpc.py 1.20.4.1 => 1.20.4.2 ===
# Flag indicating whether a main loop is running. If one isn't running,
# then we'll have to provide our own main loop at times.
- __haveMainLoop=0
+ __haveMainLoop=0
def __Wakeup(*args): pass
def __init__(self, connection, outOfBand=None, tmin=5, tmax=300, debug=0):
@@ -69,7 +69,7 @@
s=socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
else:
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect(connection)
+ s.connect(connection)
except Exception, err:
if debug:
LOG(debug, DEBUG, "Failed to connect to server: %s" % err)
@@ -80,13 +80,13 @@
else:
if debug:
LOG(debug, DEBUG, "Connected to server")
-
+
# Make sure the result lock is set, se we don't
# get an old result (e.g. the exception that
# we generated on close).
self.__r=None
self.__la(0)
-
+
self.aq_parent.notifyConnected(s)
return 1
@@ -131,7 +131,7 @@
self.__Wakeup=Wakeup
-
+
def __call__(self, *args):
self.__call_la()
try:
@@ -148,7 +148,7 @@
if c=='R':
if r=='RN.': return None # Common case!
return loads(r[1:])
-
+
# If c == 'E', an error occured on the server. In
# this case, the return value is a pickled exception.
# Unpickle it and raise it on the client side. The
@@ -162,7 +162,7 @@
raise UnUnPickleableError(r[1:])
if type(r) is TupleType:
raise r[0], r[1] # see server log for real traceback
- raise r
+ raise r
oob=self._outOfBand
if oob is not None:
r=r[1:]
@@ -227,12 +227,12 @@
if self.__haveMainLoop:
# We aren't willing to close until told to by the main loop.
# So we'll tell the main loop to tell us. :)
- self.__Wakeup(lambda self=self: self.close())
+ self.__Wakeup(lambda self=self: self.close())
else:
self.close()
self._outOfBand = None
self.__closed = 1
-
+
def close(self):
asyncRPC.inheritedAttribute('close')(self)
self.aq_parent.notifyDisconnected(self)