[Zodb-checkins] CVS: ZODB3/ZEO1 - ClientStorage.py:1.2.8.1 Invalidator.py:1.1.1.1.22.1 StorageServer.py:1.1.1.1.22.1 __init__.py:1.1.1.1.22.1 asyncwrap.py:1.1.1.1.22.1 fap.py:1.1.1.1.22.1 smac.py:1.2.22.1 start.py:1.2.8.1 trigger.py:1.1.1.1.22.1 zrpc.py:1.2.22.1

Tim Peters tim.one at comcast.net
Tue Jul 1 17:57:47 EDT 2003


Update of /cvs-repository/ZODB3/ZEO1
In directory cvs.zope.org:/tmp/cvs-serv9924/ZEO1

Modified Files:
      Tag: zodb33-devel-branch
	ClientStorage.py Invalidator.py StorageServer.py __init__.py 
	asyncwrap.py fap.py smac.py start.py trigger.py zrpc.py 
Log Message:
Whitespace normalization.


=== ZODB3/ZEO1/ClientStorage.py 1.2 => 1.2.8.1 ===
--- ZODB3/ZEO1/ClientStorage.py:1.2	Wed Oct 23 15:06:36 2002
+++ ZODB3/ZEO1/ClientStorage.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """Network ZODB storage client
 """
@@ -62,7 +62,7 @@
         self._info={'length': 0, 'size': 0, 'name': 'ZEO Client',
                     'supportsUndo':0, 'supportsVersions': 0,
                     }
-        
+
         self._call=zrpc.asyncRPC(connection, debug=debug,
                                  tmin=min_disconnect_poll,
                                  tmax=max_disconnect_poll)
@@ -93,7 +93,7 @@
     def registerDB(self, db, limit):
         """Register that the storage is controlled by the given DB.
         """
-        
+
         # Among other things, we know that our data methods won't get
         # called until after this call.
 
@@ -143,7 +143,7 @@
         LOG("ClientStorage", INFO, "Connected to storage")
         self._lock_acquire()
         try:
-            
+
             # We let the connection keep coming up now that
             # we have the storage lock. This way, we know no calls
             # will be made while in the process of coming up.
@@ -163,7 +163,7 @@
             # we will really never do a synchronous commit.
             # See below.
             self.__begin='tpc_begin_sync'
-            
+
             self._call.message_output(str(self._storage))
 
             ### This seems silly. We should get the info asynchronously.
@@ -248,7 +248,7 @@
                 self.invalidator = None
             self.closed = 1
         finally: self._lock_release()
-        
+
     def commitVersion(self, src, dest, transaction):
         if transaction is not self._transaction:
             raise POSException.StorageTransactionError(self, transaction)
@@ -274,16 +274,16 @@
             self._connected and 'connected' or 'disconnected')
 
     def getSize(self): return self._info['size']
-                  
+
     def history(self, oid, version, length=1):
         self._lock_acquire()
-        try: return self._call('history', oid, version, length)     
-        finally: self._lock_release()       
-                  
+        try: return self._call('history', oid, version, length)
+        finally: self._lock_release()
+
     def loadSerial(self, oid, serial):
         self._lock_acquire()
-        try: return self._call('loadSerial', oid, serial)     
-        finally: self._lock_release()       
+        try: return self._call('loadSerial', oid, serial)
+        finally: self._lock_release()
 
     def load(self, oid, version, _stuff=None):
         self._lock_acquire()
@@ -299,7 +299,7 @@
                 raise KeyError, oid # no non-version data for this
             return pv, sv
         finally: self._lock_release()
-                    
+
     def modifiedInVersion(self, oid):
         self._lock_acquire()
         try:
@@ -315,10 +315,10 @@
             if not oids:
                 oids[:]=self._call('new_oids')
                 oids.reverse()
-                
+
             return oids.pop()
         finally: self._lock_release()
-        
+
     def pack(self, t=None, rf=None, wait=0, days=0):
         # Note that we ignore the rf argument.  The server
         # will provide it's own implementation.
@@ -335,7 +335,7 @@
         try:
             serial=self._call.sendMessage('storea', oid, serial,
                                           data, version, self._serial)
-            
+
             write=self._tfile.write
             buf = string.join(("s", oid,
                                pack(">HI", len(version), len(data)),
@@ -352,7 +352,7 @@
                 return r
 
             return serial
-        
+
         finally: self._lock_release()
 
     def tpc_vote(self, transaction):
@@ -370,21 +370,21 @@
                 d=self._seriald
                 for oid, s in r: d[oid]=s
                 return r
-        
+
         finally: self._lock_release()
-            
+
     def supportsUndo(self):
         return self._info['supportsUndo']
-    
+
     def supportsVersions(self):
         return self._info['supportsVersions']
-    
+
     def supportsTransactionalUndo(self):
         try:
             return self._info['supportsTransactionalUndo']
         except KeyError:
             return 0
-        
+
     def tpc_abort(self, transaction):
         self._lock_acquire()
         try:
@@ -417,17 +417,17 @@
                 t=apply(TimeStamp,(time.gmtime(t)[:5]+(t%60,)))
                 self._ts=t=t.laterThan(self._ts)
                 id=`t`
-                
+
                 try:
                     if not self._connected:
                         raise ClientDisconnected(
                             "This action is temporarily unavailable.<p>")
                     r=self._call(self.__begin, id, user, desc, ext)
                 except:
-                    # XXX can't seem to guarantee that the lock is held here. 
+                    # XXX can't seem to guarantee that the lock is held here.
                     self._commit_lock_release()
                     raise
-                
+
                 if r is None: break
 
             # We have *BOTH* the local and distributed commit
@@ -438,7 +438,7 @@
             del self._serials[:]
 
             self._transaction=transaction
-            
+
         finally: self._lock_release()
 
     def tpc_finish(self, transaction, f=None):
@@ -520,7 +520,7 @@
             oids=self._call('undo', transaction_id)
             cinvalidate=self._cache.invalidate
             for oid in oids:
-                cinvalidate(oid,'')                
+                cinvalidate(oid,'')
             return oids
         finally: self._lock_release()
 
@@ -533,7 +533,7 @@
 
     def undoLog(self, first=0, last=-20, filter=None):
         if filter is not None: return ()
-        
+
         self._lock_acquire()
         try: return self._call('undoLog', first, last) # Eek!
         finally: self._lock_release()


=== ZODB3/ZEO1/Invalidator.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/Invalidator.py:1.1.1.1	Mon Aug 12 16:39:54 2002
+++ ZODB3/ZEO1/Invalidator.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """Facility for (roughly) atomically invalidating cache entries.
 
@@ -22,7 +22,7 @@
 class Invalidator:
 
     _d=None
-    
+
     def __init__(self, dinvalidate, cinvalidate):
         self.dinvalidate=dinvalidate
         self.cinvalidate=cinvalidate


=== ZODB3/ZEO1/StorageServer.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/StorageServer.py:1.1.1.1	Mon Aug 12 16:39:57 2002
+++ ZODB3/ZEO1/StorageServer.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 __version__ = "$Revision$"[11:-2]
@@ -59,7 +59,7 @@
 class StorageServer(asyncore.dispatcher):
 
     def __init__(self, connection, storages):
-        
+
         self.__storages=storages
         for n, s in storages.items():
             init_storage(s)
@@ -90,7 +90,7 @@
             LOG('ZEO Server', ERROR, "Unknown storage_id: %s" % storage_id)
             connection.close()
             return None, None
-        
+
         connections=self.__get_connections(storage_id, None)
         if connections is None:
             self.__connections[storage_id]=connections=[]
@@ -98,32 +98,32 @@
         return storage, storage_id
 
     def unregister_connection(self, connection, storage_id):
-        
+
         connections=self.__get_connections(storage_id, None)
-        if connections: 
+        if connections:
             n=[]
             for c in connections:
                 if c is not connection:
                     n.append(c)
-        
+
             self.__connections[storage_id]=n
 
     def invalidate(self, connection, storage_id, invalidated=(), info=0,
                    dump=dump):
         for c in self.__connections[storage_id]:
-            if invalidated and c is not connection: 
+            if invalidated and c is not connection:
                 c.message_output('I'+dump(invalidated, 1))
             if info:
                 c.message_output('S'+dump(info, 1))
 
     def writable(self): return 0
-    
+
     def handle_read(self): pass
-    
+
     def readable(self): return 1
-    
+
     def handle_connect (self): pass
-    
+
     def handle_accept(self):
         try:
             x = self.accept()
@@ -166,7 +166,7 @@
     except:
         raise StorageServerError, (
             "Couldn\'t find global %s in module %s" % (name, module))
-        
+
     safe=getattr(r, '__no_side_effects__', 0)
     if safe: return r
 
@@ -192,7 +192,7 @@
         if (t is not None and self.__storage is not None and
             self.__storage._transaction is t):
             self.tpc_abort(t.id)
-        else:           
+        else:
             self._transaction=None
             self.__invalidated=[]
 
@@ -219,19 +219,19 @@
             # Send info back asynchronously, so client need not ask
             self.message_output('S'+dump(self.get_info(), 1))
             return
-            
+
         try:
 
             # Unpickle carefully.
             unpickler=Unpickler(StringIO(message))
             unpickler.find_global=find_global
             args=unpickler.load()
-            
+
             name, args = args[0], args[1:]
             if __debug__:
                 apply(blather,
                       ("call", id(self), ":", name,) + args)
-                
+
             if not storage_method(name):
                 raise 'Invalid Method Name', name
             if hasattr(self, name):
@@ -250,8 +250,8 @@
 
         if __debug__:
             blather("%s R: %s" % (id(self), `r`))
-            
-        r=dump(r,1)            
+
+        r=dump(r,1)
         self.message_output('R'+r)
 
     def return_error(self, err_type, err_value, type=type, dump=dump):
@@ -260,7 +260,7 @@
 
         if __debug__:
             blather("%s E: %s" % (id(self), `err_value`))
-                    
+
         try: r=dump(err_value, 1)
         except:
             # Ugh, must be an unpicklable exception
@@ -269,7 +269,7 @@
             r=dump(r,1)
 
         self.message_output('E'+r)
-        
+
 
     def get_info(self):
         storage=self.__storage
@@ -308,10 +308,10 @@
             else:
                 raise
         return p, s, v, pv, sv
-            
+
 
     def beginZeoVerify(self):
-        self.message_output('bN.')            
+        self.message_output('bN.')
         return _noreturn
 
     def zeoVerify(self, oid, s, sv,
@@ -320,10 +320,10 @@
         except: return _noreturn
         p=pv=None # free the pickles
         if os != s:
-            self.message_output('i'+dump((oid, ''),1))            
+            self.message_output('i'+dump((oid, ''),1))
         elif osv != sv:
             self.message_output('i'+dump((oid,  v),1))
-            
+
         return _noreturn
 
     def endZeoVerify(self):
@@ -388,7 +388,7 @@
             t=self._transaction
             if t is None or id != t.id:
                 raise POSException.StorageTransactionError(self, id)
-        
+
             newserial=self.__storage.store(oid, serial, data, version, t)
         except TransactionError, v:
             # This is a normal transaction errorm such as a conflict error
@@ -416,7 +416,7 @@
         self.message_output('s'+r)
         return _noreturn
 
-    def vote(self, id): 
+    def vote(self, id):
         t=self._transaction
         if t is None or id != t.id:
             raise POSException.StorageTransactionError(self, id)
@@ -427,7 +427,7 @@
         if t is None or id != t.id:
             raise POSException.StorageTransactionError(self, id)
         return self.__storage.transactionalUndo(trans_id, self._transaction)
-        
+
     def undo(self, transaction_id):
         oids=self.__storage.undo(transaction_id)
         if oids:
@@ -494,7 +494,7 @@
         self._transaction = None
         self.__invalidated = []
         self.commitlock_resume()
-        
+
     def unlock(self):
         if self.__closed:
             return
@@ -514,7 +514,7 @@
         if storage._transaction is not None:
             self.commitlock_suspend(self.unlock, (), self.close)
             return 1 # Return a flag indicating a lock condition.
-            
+
         self._transaction=t=Transaction()
         t.id=id
         t.user=user
@@ -537,7 +537,7 @@
                                     (id, user, description, ext),
                                     self.close)
         return _noreturn
-        
+
     def try_again_sync(self, id, user, description, ext):
         storage=self.__storage
         if storage._transaction is None:
@@ -549,7 +549,7 @@
             self.__invalidated=[]
             LOG("ZEO Server", BLATHER, "try_again_sync return None")
             self.message_output('RN.')
-            
+
         return 1
 
     def tpc_finish(self, id, user, description, ext):
@@ -568,7 +568,7 @@
                                      self.__invalidated,
                                      self.get_size_info())
             self.__invalidated = []
-            
+
 
 def init_storage(storage):
     if not hasattr(storage,'tpc_vote'): storage.tpc_vote=lambda *args: None


=== ZODB3/ZEO1/__init__.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/__init__.py:1.1.1.1	Mon Aug 12 16:39:57 2002
+++ ZODB3/ZEO1/__init__.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 import fap


=== ZODB3/ZEO1/asyncwrap.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/asyncwrap.py:1.1.1.1	Mon Aug 12 16:39:54 2002
+++ ZODB3/ZEO1/asyncwrap.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """A wrapper for asyncore that provides robust exception handling.
 
@@ -48,7 +48,7 @@
                 raise
         else:
             break
-    
+
 def poll(*args, **kwargs):
     try:
         apply(asyncore.poll, args, kwargs)


=== ZODB3/ZEO1/fap.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/fap.py:1.1.1.1	Mon Aug 12 16:39:54 2002
+++ ZODB3/ZEO1/fap.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 """ZEO depends on recent versions of asyncore and cPickle
@@ -25,7 +25,7 @@
     try: m=imp.find_module('ZServer', [where])
     except: return 0
     else: return 1
-    
+
 
 def fap():
     # if we are using an old version of Python, our asyncore is likely to
@@ -37,12 +37,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:


=== ZODB3/ZEO1/smac.py 1.2 => 1.2.22.1 ===
--- ZODB3/ZEO1/smac.py:1.2	Wed Oct  2 15:54:02 2002
+++ ZODB3/ZEO1/smac.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """Sized message async connections
 """
@@ -82,7 +82,7 @@
 
         inpl=self.__inpl+len(d)
         l=self.__l
-            
+
         while 1:
 
             if l <= inpl:
@@ -90,7 +90,7 @@
                 if _type(inp) is not StringType: inp=join(inp,'')
                 d=inp[:l]
                 inp=inp[l:]
-                inpl=inpl-l                
+                inpl=inpl-l
                 if self.__state is _None:
                     # waiting for message
                     l=struct.unpack(">i",d)[0]
@@ -101,7 +101,7 @@
                     self.message_input(d)
             else:
                 break # not enough data
-                
+
         self.__l=l
         self.__inp=inp
         self.__inpl=inpl
@@ -140,7 +140,7 @@
         append=self.__append
         if append is None:
             raise Disconnected("This action is temporarily unavailable.<p>")
-        
+
         append(pack(">i",len(message))+message)
 
     def log_info(self, message, type='info'):
@@ -158,4 +158,3 @@
 class Disconnected(Exception):
     """The client has become disconnected from the server
     """
-    


=== ZODB3/ZEO1/start.py 1.2 => 1.2.8.1 ===
--- ZODB3/ZEO1/start.py:1.2	Tue Oct  8 15:41:12 2002
+++ ZODB3/ZEO1/start.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 """Start the server storage.
@@ -25,7 +25,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={}):
@@ -87,7 +87,7 @@
              in the foreground.
 
        -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
@@ -160,7 +160,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
@@ -175,7 +175,7 @@
                 uid = pwd.getpwuid(UID)[2]
                 gid = pwd.getpwuid(UID)[3]
             else:
-                raise KeyError 
+                raise KeyError
             try:
                 if gid is not None:
                     try:
@@ -257,7 +257,7 @@
 
         import traceback
         apply(traceback.print_exception, info)
-            
+
         sys.exit(0)
 
     try:
@@ -302,7 +302,7 @@
             "Shutting down (%s)" % (die and "shutdown" or "restart")
             )
     except: pass
-    
+
     if die: sys.exit(0)
     else: sys.exit(1)
 


=== ZODB3/ZEO1/trigger.py 1.1.1.1 => 1.1.1.1.22.1 ===
--- ZODB3/ZEO1/trigger.py:1.1.1.1	Mon Aug 12 16:39:59 2002
+++ ZODB3/ZEO1/trigger.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 # This module is a simplified version of the select_trigger module
@@ -21,7 +21,7 @@
 import socket
 import string
 import thread
-    
+
 if os.name == 'posix':
 
     class trigger(asyncore.file_dispatcher):
@@ -139,7 +139,7 @@
                     if port <= 19950:
                         raise 'Bind Error', 'Cannot bind trigger!'
                     port=port - 1
-            
+
             a.listen(1)
             w.setblocking(0)
             try:


=== ZODB3/ZEO1/zrpc.py 1.2 => 1.2.22.1 ===
--- ZODB3/ZEO1/zrpc.py:1.2	Thu Oct  3 14:00:36 2002
+++ ZODB3/ZEO1/zrpc.py	Tue Jul  1 16:57:14 2003
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 """Simple rpc mechanisms
 """
@@ -41,7 +41,7 @@
 
     # 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):
@@ -73,7 +73,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)
@@ -84,13 +84,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
 
@@ -138,7 +138,7 @@
 
         self.__Wakeup=Wakeup
 
-         
+
     def __call__(self, *args):
         self.__call_la()
         try:
@@ -155,7 +155,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
@@ -169,7 +169,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:]
@@ -234,12 +234,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)




More information about the Zodb-checkins mailing list