[Zodb-checkins] CVS: ZODB3/ZEO/auth - base.py:1.2.6.3
Christian Reis
kiko at async.com.br
Thu Dec 18 22:01:05 EST 2003
Update of /cvs-repository/ZODB3/ZEO/auth
In directory cvs.zope.org:/tmp/cvs-serv26419/auth
Modified Files:
Tag: Zope-2_7-branch
base.py
Log Message:
Rework overzealous check when specifying realm to Database.
=== ZODB3/ZEO/auth/base.py 1.2.6.2 => 1.2.6.3 ===
--- ZODB3/ZEO/auth/base.py:1.2.6.2 Thu Dec 18 21:08:43 2003
+++ ZODB3/ZEO/auth/base.py Thu Dec 18 22:01:04 2003
@@ -46,7 +46,7 @@
usernames to password hashes. The hashes are SHA hex digests
produced from the password string.
"""
-
+ realm = None
def __init__(self, filename, realm=None):
"""Creates a new Database
@@ -60,11 +60,12 @@
self._users = {}
self.filename = filename
self.load()
- if self.realm and self.realm != realm:
- raise ValueError, ("Specified realm %r differs from "
- "database realm %r" % (realm or '', self.realm))
- else:
- self.realm = realm
+ if realm:
+ if self.realm and self.realm != realm:
+ raise ValueError, ("Specified realm %r differs from database "
+ "realm %r" % (realm or '', self.realm))
+ else:
+ self.realm = realm
def save(self, fd=None):
filename = self.filename
More information about the Zodb-checkins
mailing list