SVN: Zope/branches/2.13/ Use `in` operator instead of deprecated `has_key`.
Malthe Borch <[email protected]> Wed, 14 Dec 2011 09:45:38 -0500 (EST)
| Newsgroups | gmane.comp.web.zope.cvs |
|---|---|
| Message-ID | <[email protected]> |
Log message for revision 123812:
Use `in` operator instead of deprecated `has_key`.
Changed:
U Zope/branches/2.13/doc/CHANGES.rst
U Zope/branches/2.13/src/ZPublisher/BaseRequest.py
-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst 2011-12-14 14:44:06 UTC (rev 123811)
+++ Zope/branches/2.13/doc/CHANGES.rst 2011-12-14 14:45:38 UTC (rev 123812)
@@ -8,6 +8,10 @@
2.13.12 (unreleased)
--------------------
+- Use ``in`` operator instead of deprecated ``has_key`` method (which
+ is not implemented by ``OFS.ObjectManager``). This fixes an issue
+ with WebDAV requests for skin objects.
+
- Updated distributions:
- Products.ZCatalog = 2.13.22
Modified: Zope/branches/2.13/src/ZPublisher/BaseRequest.py
===================================================================
--- Zope/branches/2.13/src/ZPublisher/BaseRequest.py 2011-12-14 14:44:06 UTC (rev 123811)
+++ Zope/branches/2.13/src/ZPublisher/BaseRequest.py 2011-12-14 14:45:38 UTC (rev 123812)
@@ -540,9 +540,9 @@
if (no_acquire_flag and
hasattr(parents[1], 'aq_base') and
not hasattr(parents[1],'__bobo_traverse__')):
- if not (hasattr(parents[1].aq_base, entry_name) or
- parents[1].aq_base.has_key(entry_name)):
- raise AttributeError, entry_name
+ base = parents[-1].aq_base
+ if not (hasattr(base, entry_name) or entry_name in base):
+ raise AttributeError(entry_name)
# After traversal post traversal hooks aren't available anymore
del self._post_traverse
_______________________________________________
Zope-Checkins maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins