AlertEngine crash: global name 'TimePeriod' is not defined

Bug #303967 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
High
Thomas Adamcik

Bug Description

AlertEngine has been found to crash with this as its last log entry:

[2008-12-01 08:45:45,757] [CRITICAL] [pid=17439 nav.alertengine] Unhandeled error: global name 'TimePeriod' is not defined
Traceback (most recent call last):
  File "/usr/lib/nav/alertengine.py", line 163, in main
    check_alerts(debug=opttest)
  File "/usr/lib/python2.4/site-packages/nav/alertengine/base.py", line 80, in check_alerts
    sent_daily, sent_weekly = handle_queued_alerts(queued_alerts, now)
  File "/usr/lib/python2.4/site-packages/nav/alertengine/base.py", line 269, in handle_queued_alerts
    valid_during = [TimePeriod.ALL_WEEK,TimePeriod.WEEKDAYS]
NameError: global name 'TimePeriod' is not defined

Looks like missing import which hits us when someone queues for the next time periode in their profile.

Tags: alertengine
Changed in nav:
assignee: nobody → adamcik
importance: Undecided → High
milestone: none → v3.5.0b3
status: New → Confirmed
Revision history for this message
Thomas Adamcik (adamcik) wrote :
Changed in nav:
status: Confirmed → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.