[Zope3-checkins] CVS: Zope3/src/zope/app/traversing - adapters.py:1.6
Marius Gedminas
mgedmin@codeworks.lt
Mon, 28 Apr 2003 09:18:39 -0400
Update of /cvs-repository/Zope3/src/zope/app/traversing
In directory cvs.zope.org:/tmp/cvs-serv26481
Modified Files:
adapters.py
Log Message:
Reuse local variable 'subject' if we already have it
=== Zope3/src/zope/app/traversing/adapters.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/traversing/adapters.py:1.5 Mon Mar 24 11:42:22 2003
+++ Zope3/src/zope/app/traversing/adapters.py Mon Apr 28 09:18:38 2003
@@ -52,9 +52,9 @@
if hasattr(subject, '__getitem__'):
# Let exceptions propagate.
- return self._subject[name]
+ return subject[name]
else:
- raise NotFoundError(self._subject, name)
+ raise NotFoundError(subject, name)
class ObjectName(object):
@@ -233,4 +233,3 @@
raise
return obj
-