I swear these are exact copy-and-pastes:

------------------------------------------------------------------------------------------------------------

Python 2.5.1 (r251:54863, Oct 30 2007, 13:45:26)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import turbogears
>>> turbogears.validators.Int( ).to_python('5')
5
>>> turbogears.validators.Int( ).to_python('x')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/usr/lib/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg/formencode/api.py",
line 368, in to_python
    value = tp(value, state)
  File 
"/usr/lib/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg/formencode/validators.py",
line 924, in _to_python
    raise Invalid(self.message('integer', state),
  File 
"/usr/lib/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg/formencode/api.py",
line 194, in message
    return trans(self._messages[msgName], **self.gettextargs) % kw
TypeError: ugettext() got an unexpected keyword argument 'domain'
>>>

----------------------------------------------------------------------------------------------------------

Python 2.5.1 (r251:54863, Oct 30 2007, 13:45:26)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import turbogears
>>> turbogears.validators.Int( ).to_python('x')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/usr/lib/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg/formencode/api.py",
line 368, in to_python
    value = tp(value, state)
  File 
"/usr/lib/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg/formencode/validators.py",
line 925, in _to_python
    value, state)
formencode.api.Invalid: Please enter an integer value
>>>

-----------------------------------------------------------------------------------------------------------

As you can see the second session worked as expected but the first one
-- which only differs from the second one by doing first a validation
that goes through -- is totally weird. Can anyone explain?

Cheers,
Daniel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to