Opened 11 years ago

Last modified 11 years ago

#308 defect closed fixed (fixed)

Bug in the webmonitor.py example that causes just one iteration and then stops

Reported by: lstep Owned by:
Priority: high Milestone:
Component: conch Keywords:
Cc: lstep, moshez Branch:
Author: Launchpad Bug:

Description


Change History (3)

comment:1 Changed 11 years ago by lstep

The webmonitor.py example, when run, connects just once to the remote web 
server, and then do nothing. The problem is that in the example there is no 
reportNoChange() method in the ChangeNotified class. So when the ChangeChecker 
is called and that there is no change on the page (most usual :), it tries to 
call self.notified.reportNoChange() which doesn't exist ! So it "crashes" 
silently, and you think monitor is working... 
To correct this, just add:: 
 
  def reportNoChange(self): 
          pass 
in the ChangeNotified class of the webmonitor.py example file. 
 
To be more clean, I suggest to add a test for the presence of the methods 
reportNoChange() and reportChange() in t.w.monitor module.

comment:2 Changed 11 years ago by moshez

Checking in twisted/web/monitor.py;
/cvs/Twisted/twisted/web/monitor.py,v  <--  monitor.py
new revision: 1.7; previous revision: 1.6
done
Fixed [By enhancing BaseChange]

comment:3 Changed 3 years ago by <automation>

  • Owner moshez deleted
Note: See TracTickets for help on using tickets.