[Zope-Checkins] SVN: Zope/branches/2.13/ Use `in` operator instead of deprecated `has_key`.
Malthe Borch
mborch at gmail.com
Wed Dec 14 14:45:38 UTC 2011
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
More information about the Zope-Checkins
mailing list