[ZPT] CVS: Zope/lib/python/Products/PageTemplates - ZopePageTemplate.py:1.41

Casey Duncan casey@zope.com
Fri, 7 Jun 2002 16:27:58 -0400


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv7619

Modified Files:
	ZopePageTemplate.py 
Log Message:
code consistency cleanup


=== Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.40 => 1.41 ===
             cols = max(cols, 100) # Max width 100%
             cols = "%d%%" % cols # Add percent sign back on
-        elif type(width) is StringType and dtpref_cols[-1:] == "%":
+        elif type(width) is StringType and dtpref_cols.endswith('%'):
             cols = int(dtpref_cols[:-1])
             cols = max(cols + szchw.get(width, 0), 25) # Min width 25%
             cols = min(cols, 100) # Max width 100%