FlowController no tira ValueError cuando se setea Timeout a "-1"
Bug #480804 reported by
Mauro
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lalita |
Fix Released
|
High
|
Unassigned |
Bug Description
El problema sucede al comparar si el timeout es menor que sero, este chequeo falla si timeout es un string numerico negativo ("-1"...etc). Este error no es capturado ya que float(timeout), convierte efectivamente al numero correspondiente, pero luego la comparacion se hace sobre el parametro y no sobre el atributo timeout de FlowController
self.timeout = float(timeout)
if timeout <= 0:
raise ValueError("The timeout if present should be > 0, "received: %r" % timeout)
El test que habria que agregar en test_timeout seria:
self.assertRais
Changed in lalita: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → alpha |
Changed in lalita: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Test agregado y código corregido.
¡Muchas gracias!