[twill] Twill does not respect time limit in http-equiv="refresh" tag
C. Titus Brown
ctb at msu.edu
Sun Jul 20 19:55:01 PDT 2008
On Sat, Jul 19, 2008 at 06:53:58PM -0400, David L. Erdman II wrote:
-> Most browsers interpret this to mean "refresh this page in 900 and redirect
-> to /online/servlet/efsonline/SignOff". However, twill seems to be ignoring
-> the "900" and refreshing immediately (although it does redirect to the
-> proper URL).
->
->
-> Turning on debugging for equiv-refresh gives me:
-> equiv-refresh DEBUG: code 200, hdrs has 'refresh'
-> equiv-refresh DEBUG: refresh header is
-> 900;URL=/online/servlet/efsonline/SignOff
-> equiv-refresh DEBUG: pause: 900
-> equiv-refresh DEBUG: new url: URL=/online/servlet/efsonline/SignOff
-> equiv-refresh DEBUG: final url: /online/servlet/efsonline/SignOff
-> Following HTTP-EQUIV=REFRESH to /online/servlet/efsonline/SignOff
->
->
-> The problem appears in line 436:
-> if pause != 0 and 0: # CTB hack! ==# and
-> self.honor_time:
->
-> In this case, pause != 0 BUT 0 always evaluates to False! My guess is that
-> it is there because there is no solution yet, as using time.sleep(pause)
-> seems to be a bad idea because it blocks everything else (I'm sure you know
-> this!).
->
->
-> What was the purpose of that if-statement?
That was me forgetting to clean up code :). I copied the code from
mechanize & fixed it for my own purposes some time ago, and then ...
forgot to clean it up.
I don't see any purpose in honoring the pause time; is there one?
cheers,
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the twill
mailing list