Hi All!

Zope 2.6: pressing of "Taller" or "Shorter" buttons of the page template edit window raises ValueError. Patch attached.

--
Dmitry Vasiliev (dima at hlabs.spb.ru)
Index: ZopePageTemplate.py
===================================================================
RCS file: /cvs-repository/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py,v
retrieving revision 1.44
diff -u -r1.44 ZopePageTemplate.py
--- ZopePageTemplate.py 18 Sep 2002 15:12:46 -0000      1.44
+++ ZopePageTemplate.py 10 Dec 2002 14:33:43 -0000
@@ -155,8 +155,11 @@
             cols = min(cols, 100) # Max width 100%
             cols = "%d%%" % cols # Add percent sign back on
         else: # Absolute width
-            try: cols = int(width)
-            except: cols = max(40, int(dtpref_cols) + szchw.get(width, 0))
+            try:
+                cols = int(width)
+            except:
+                cols = max(40, int(dtpref_cols[:-1]) + szchw.get(width, 0))
+                cols = "%d%%" % cols # Add percent sign back on
 
         try: rows = int(height)
         except: rows = max(1, int(dtpref_rows) + szchh.get(height, 0))


Reply via email to