[formfields] py3k kill future compat warning stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 01 Oct 2013 12:11:00 +0200
branchstable
changeset 9278 a7894d5f00bb
parent 9277 c964d8cf6efc
child 9279 0814b9dd9bf3
[formfields] py3k kill future compat warning Related to #3179561.
web/formfields.py
--- a/web/formfields.py	Thu Oct 10 12:42:10 2013 +0200
+++ b/web/formfields.py	Tue Oct 01 12:11:00 2013 +0200
@@ -564,7 +564,7 @@
             widget.attrs.setdefault('maxlength', self.max_length)
 
     def init_text_area(self, widget):
-        if self.max_length < 513:
+        if self.max_length and self.max_length < 513:
             widget.attrs.setdefault('cols', 60)
             widget.attrs.setdefault('rows', 5)