don't call a function as default function argument! Fixes time when sending forwarded message

This commit is contained in:
Yann Leboulanger 2011-09-18 16:11:27 +02:00
parent 55beaaa47e
commit 77183740d6
1 changed files with 4 additions and 2 deletions

View File

@ -122,8 +122,10 @@ class Events:
def remove_account(self, account):
del self._events[account]
def create_event(self, type_, parameters, time_ = time.time(),
show_in_roster = False, show_in_systray = True):
def create_event(self, type_, parameters, time_=None,
show_in_roster=False, show_in_systray=True):
if not time_:
time_ = time.time()
return Event(type_, time_, parameters, show_in_roster,
show_in_systray)