Commit fe7e4b62 authored by Tim Peters's avatar Tim Peters

Trimmed trailing whitespace.

parent 85a156c2
...@@ -164,7 +164,7 @@ class ClientStorage: ...@@ -164,7 +164,7 @@ class ClientStorage:
username -- string with username to be used when authenticating. username -- string with username to be used when authenticating.
These only need to be provided if you are connecting to an These only need to be provided if you are connecting to an
authenticated server storage. authenticated server storage.
password -- string with plaintext password to be used password -- string with plaintext password to be used
when authenticated. when authenticated.
...@@ -217,7 +217,7 @@ class ClientStorage: ...@@ -217,7 +217,7 @@ class ClientStorage:
# but _server is set only after cache verification has finished # but _server is set only after cache verification has finished
# and clients can safely use the server. _pending_server holds # and clients can safely use the server. _pending_server holds
# a server stub while it is being verified. # a server stub while it is being verified.
self._server = disconnected_stub self._server = disconnected_stub
self._connection = None self._connection = None
self._pending_server = None self._pending_server = None
...@@ -372,7 +372,7 @@ class ClientStorage: ...@@ -372,7 +372,7 @@ class ClientStorage:
# If there is no connection, return immediately. Technically, # If there is no connection, return immediately. Technically,
# there are no pending invalidations so they are all handled. # there are no pending invalidations so they are all handled.
# There doesn't seem to be much benefit to raising an exception. # There doesn't seem to be much benefit to raising an exception.
cn = self._connection cn = self._connection
if cn is not None: if cn is not None:
cn.pending() cn.pending()
...@@ -394,12 +394,12 @@ class ClientStorage: ...@@ -394,12 +394,12 @@ class ClientStorage:
"%s: %s isn't a valid protocol, must have a Client class" % "%s: %s isn't a valid protocol, must have a Client class" %
(self.__class__.__name__, protocol)) (self.__class__.__name__, protocol))
raise AuthError, "invalid protocol" raise AuthError, "invalid protocol"
c = client(stub) c = client(stub)
# Initiate authentication, returns boolean specifying whether OK # Initiate authentication, returns boolean specifying whether OK
return c.start(self._username, self._realm, self._password) return c.start(self._username, self._realm, self._password)
def testConnection(self, conn): def testConnection(self, conn):
"""Internal: test the given connection. """Internal: test the given connection.
...@@ -434,7 +434,7 @@ class ClientStorage: ...@@ -434,7 +434,7 @@ class ClientStorage:
else: else:
log2(ERROR, "Authentication failed") log2(ERROR, "Authentication failed")
raise AuthError, "Authentication failed" raise AuthError, "Authentication failed"
try: try:
stub.register(str(self._storage), self._is_read_only) stub.register(str(self._storage), self._is_read_only)
return 1 return 1
...@@ -527,7 +527,7 @@ class ClientStorage: ...@@ -527,7 +527,7 @@ class ClientStorage:
# If verify_cache() finishes the cache verification process, # If verify_cache() finishes the cache verification process,
# it should set self._server. If it goes through full cache # it should set self._server. If it goes through full cache
# verification, then endVerify() should self._server. # verification, then endVerify() should self._server.
last_inval_tid = self._cache.getLastTid() last_inval_tid = self._cache.getLastTid()
if last_inval_tid is not None: if last_inval_tid is not None:
ltid = server.lastTransaction() ltid = server.lastTransaction()
...@@ -553,7 +553,7 @@ class ClientStorage: ...@@ -553,7 +553,7 @@ class ClientStorage:
self._server = server self._server = server
self._ready.set() self._ready.set()
return "quick verification" return "quick verification"
log2(INFO, "Verifying cache") log2(INFO, "Verifying cache")
# setup tempfile to hold zeoVerify results # setup tempfile to hold zeoVerify results
self._tfile = tempfile.TemporaryFile(suffix=".inv") self._tfile = tempfile.TemporaryFile(suffix=".inv")
......
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