products/CPSonFive.old

changeset 29:69c2e69e46cd

Removed deprecation warnings.
author fguillaume
date Tue, 27 Dec 2005 17:38:35 +0000
parents 77ccb3b112a6
children 3ee761b550f0
files form/widget.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/form/widget.py
     1.2 +++ b/form/widget.py
     1.3 @@ -25,8 +25,11 @@
     1.4  from zope.app.form.interfaces import ConversionError, WidgetInputError
     1.5  
     1.6  from Products.CMFCore.utils import getToolByName
     1.7 -from zope.i18nmessageid import MessageIDFactory
     1.8 -_ = MessageIDFactory("Default")
     1.9 +try:
    1.10 +    from zope.i18nmessageid import MessageFactory
    1.11 +except ImportError:
    1.12 +    from zope.i18nmessageid import MessageIDFactory as MessageFactory
    1.13 +_ = MessageFactory("Default")
    1.14  
    1.15  class CPSWidgetInputErrorView(WidgetInputErrorView):
    1.16      """Display an input error as a snippet of text.
    1.17 @@ -86,4 +89,3 @@
    1.18          btn = renderElement("input", type="button", style=style, onClick=js, 
    1.19                              value=_("..."))
    1.20          return res + " " + btn
    1.21 -        
    1.22 \ No newline at end of file