Author: batiste.bieler
Date: Fri Jun 5 06:33:28 2009
New Revision: 545
Modified:
trunk/pages/utils.py
Log:
Minor changes
Modified: trunk/pages/utils.py
==============================================================================
--- trunk/pages/utils.py (original)
+++ trunk/pages/utils.py Fri Jun 5 06:33:28 2009
@@ -55,8 +55,9 @@
Recursively search into a template node list for PlaceholderNode node
"""
for node in nodelist:
- # I don't have found a better way to do it now. isinstance fail
quickly.
- if str(node.__class__).find("PlaceholderNode") >=0:
+ # Using isinstance is always a bad idea and never works properly.
+ if hasattr(node, 'page') and hasattr(node, 'parsed') and \
+ hasattr(node, 'as_varname') and hasattr(node, 'name'):
already_in_plist = False
for p in plist:
if p.name == node.name:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---