Commit 690bdce9 authored by Scott Moser's avatar Scott Moser

fix timestamp in reporting events.

If no timestamp was passed into a ReportingEvent, then the default was
used.  That default was 'time.time()' which was evaluated once only at
import time.
parent 0780b3ab
......@@ -33,11 +33,13 @@ class ReportingEvent(object):
"""Encapsulation of event formatting."""
def __init__(self, event_type, name, description,
origin=DEFAULT_EVENT_ORIGIN, timestamp=time.time()):
origin=DEFAULT_EVENT_ORIGIN, timestamp=None):
self.event_type = event_type = name
self.description = description
self.origin = origin
if timestamp is None:
timestamp = time.time()
self.timestamp = timestamp
def as_string(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment