[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.93.2.7

Jeremy Hylton jeremy at zope.com
Thu May 29 20:33:03 EDT 2003


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv10666/ZEO

Modified Files:
      Tag: ZODB3-auth-branch
	ClientStorage.py 
Log Message:
A few cleanups.



=== ZODB3/ZEO/ClientStorage.py 1.93.2.6 => 1.93.2.7 ===
--- ZODB3/ZEO/ClientStorage.py:1.93.2.6	Thu May 29 17:30:10 2003
+++ ZODB3/ZEO/ClientStorage.py	Thu May 29 19:33:02 2003
@@ -363,7 +363,7 @@
             cn.pending()
 
     def doAuth(self, protocol, stub):
-        if self._username == '' and self._password == '':
+        if not (self._username and self._password):
             raise AuthError, "empty username or password"
 
         module = get_module(protocol)
@@ -411,11 +411,12 @@
         self._conn_is_read_only = 0
         stub = self.StorageServerStubClass(conn)
 
-        # XXX: Verify return value?
         auth = stub.getAuthProtocol()
+        log2(INFO, "Server authentication protocol %r" % auth)
         if auth:
-            skey = self.doAuth(auth, stub)
-            if not skey:
+            if self.doAuth(auth, stub):
+                log2(INFO, "Client authentication successful")
+            else:
                 log2(ERROR, "Authentication failed")
                 raise AuthError, "Authentication failed"
         




More information about the Zodb-checkins mailing list