Commit 2e5d3030 authored by Tim Peters's avatar Tim Peters

Whitespace normalization.

parent 51675fd3
...@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop ...@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop
thread calls loop(), each registered callback will be called with the thread calls loop(), each registered callback will be called with the
socket map as its first argument. socket map as its first argument.
""" """
__version__ = '$Revision: 1.9 $'[11:-2] __version__ = '$Revision: 1.10 $'[11:-2]
import asyncore import asyncore
import select import select
...@@ -57,17 +57,17 @@ def register_loop_callback(callback, args=(), kw=None): ...@@ -57,17 +57,17 @@ def register_loop_callback(callback, args=(), kw=None):
_loop_callbacks.append((callback, args, kw)) _loop_callbacks.append((callback, args, kw))
finally: finally:
_loop_lock.release() _loop_lock.release()
def remove_loop_callback(callback): def remove_loop_callback(callback):
"""Remove a callback function registered earlier. """Remove a callback function registered earlier.
This is useful if loop() was never called. This is useful if loop() was never called.
""" """
for i in range(len(_loop_callbacks)): for i in range(len(_loop_callbacks)):
if _loop_callbacks[i][0] == callback: if _loop_callbacks[i][0] == callback:
del _loop_callbacks[i] del _loop_callbacks[i]
return return
def _start_loop(map): def _start_loop(map):
_loop_lock.acquire() _loop_lock.acquire()
try: try:
......
...@@ -679,7 +679,7 @@ class StorageServer: ...@@ -679,7 +679,7 @@ class StorageServer:
auth_protocol -- The name of the authentication protocol to use. auth_protocol -- The name of the authentication protocol to use.
Examples are "digest" and "srp". Examples are "digest" and "srp".
auth_database -- The name of the password database filename. auth_database -- The name of the password database filename.
It should be in a format compatible with the authentication It should be in a format compatible with the authentication
protocol used; for instance, "sha" and "srp" require different protocol used; for instance, "sha" and "srp" require different
......
...@@ -41,7 +41,7 @@ class StorageClass(ZEOStorage): ...@@ -41,7 +41,7 @@ class StorageClass(ZEOStorage):
self.database.realm, self.database.realm,
password)) password))
return self.finish_auth(dbpw == password_dig) return self.finish_auth(dbpw == password_dig)
class PlaintextClient(Client): class PlaintextClient(Client):
extensions = ["auth"] extensions = ["auth"]
......
...@@ -101,7 +101,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -101,7 +101,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
# previous MAC; the state of the MAC generator depends on the # previous MAC; the state of the MAC generator depends on the
# history of operations it has performed. So the MACs must be # history of operations it has performed. So the MACs must be
# generated in the same order they are verified. # generated in the same order they are verified.
# Each side is guaranteed to receive messages in the order # Each side is guaranteed to receive messages in the order
# they are sent, but there is no ordering constraint between # they are sent, but there is no ordering constraint between
# message sends and receives. If the two sides are A and B # message sends and receives. If the two sides are A and B
...@@ -116,7 +116,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -116,7 +116,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
# could not be verified. # could not be verified.
self.__hmac_send = None self.__hmac_send = None
self.__hmac_recv = None self.__hmac_recv = None
self.__super_init(sock, map) self.__super_init(sock, map)
def setSessionKey(self, sesskey): def setSessionKey(self, sesskey):
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version # may have a back pointer to a version record or to a non-version
# record. # record.
# #
__version__='$Revision: 1.138 $'[11:-2] __version__='$Revision: 1.139 $'[11:-2]
import base64 import base64
from cPickle import Pickler, Unpickler, loads from cPickle import Pickler, Unpickler, loads
...@@ -1531,7 +1531,7 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -1531,7 +1531,7 @@ class FileStorage(BaseStorage.BaseStorage,
""" """
if self._is_read_only: if self._is_read_only:
raise POSException.ReadOnlyError() raise POSException.ReadOnlyError()
stop=`TimeStamp(*time.gmtime(t)[:5]+(t%60,))` stop=`TimeStamp(*time.gmtime(t)[:5]+(t%60,))`
if stop==z64: raise FileStorageError, 'Invalid pack time' if stop==z64: raise FileStorageError, 'Invalid pack time'
......
...@@ -648,7 +648,7 @@ class FileStoragePacker(FileStorageFormatter): ...@@ -648,7 +648,7 @@ class FileStoragePacker(FileStorageFormatter):
# tindex: oid -> pos, for current txn # tindex: oid -> pos, for current txn
# tvindex: version -> pos of XXX, for current txn # tvindex: version -> pos of XXX, for current txn
# oid2serial: not used by the packer # oid2serial: not used by the packer
self.index = fsIndex() self.index = fsIndex()
self.vindex = {} self.vindex = {}
self.tindex = {} self.tindex = {}
......
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