Christoph Zwerschke ha scritto:
> Glauco wrote:
>   
>> all KeyError are masked  but i think that a simple code like this before 
>> the try......
>>
>> for x in (self.user_name_field, self.password_field, 
>> self.submit_button_name):
>>    if not params.has_key( x ):
>>       log.error ("Check for presence of %s field in your form fields" % x)
>>     
>
> Wouldn't it be better to output a log.warning after the except KeyError?
>
> -- Chris
>
>   
I think this is an error and not a warning beacuse if this happens you 
can't log in...

the try except, actually catch only generic KeyError, so you can return 
a generic message.




Gla




-- 
+------------------------------------------------------------+
                                  Glauco Uri - Programmatore
                                    glauco(at)allevatori.com 
                               
  Sfera Carta Software®      [EMAIL PROTECTED]
  Via Bazzanese,69  Casalecchio di Reno(BO) - Tel. 051591054 
+------------------------------------------------------------+



--~--~---------~--~----~------------~-------~--~----~
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