[Zope-Checkins] CVS: Zope3/lib/python/Zope/ObjectHub - ObjectHub.py:1.1.2.11
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 15:34:56 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/ObjectHub
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/ObjectHub
Modified Files:
Tag: Zope-3x-branch
ObjectHub.py
Log Message:
Implemented
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification
Along the way:
- Converted most uses of has_key to use in.
- Fixed a bug in Interface names and namesAndDescriptions methods
that caused base class attributes to be missed.
=== Zope3/lib/python/Zope/ObjectHub/ObjectHub.py 1.1.2.10 => 1.1.2.11 ===
location_to_ruid = self.__location_to_ruid
-
+
if location_to_ruid.has_key(canonical_location):
raise ObjectHubError, 'location %s already in object hub' % \
canonical_location
@@ -175,9 +175,10 @@
canonical_location = self._canonical(old_location)
canonical_new_location = self._canonical(new_location)
if location_to_ruid.has_key(canonical_new_location):
- raise ObjectHubError, \
- 'Cannot move to location %s, '\
- 'as there is already something there' % canonical_new_location
+ raise ObjectHubError(
+ 'Cannot move to location %s, '
+ 'as there is already something there'
+ % canonical_new_location)
if not location_to_ruid.has_key(canonical_location):
# we're not interested in this event
return