From 9e0fe54a496fa71b9bef87c1c19650dcc61060c5 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 23 Nov 2012 09:01:35 +0100 Subject: Fix the timedelta for python 3.1 --- src/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core.py b/src/core.py index b6992cc5..335c0181 100644 --- a/src/core.py +++ b/src/core.py @@ -1682,7 +1682,8 @@ class Core(object): if histo_length is not None: histo_length= str(histo_length) if tab and not tab.joined: - seconds = (datetime.now() - tab.last_connection).total_seconds() if tab.last_connection is not None else 0 + delta = datetime.now() - tab.last_connection + seconds = delta.seconds + delta.days * 24 * 3600 if tab.last_connection is not None else 0 seconds = int(seconds) muc.join_groupchat(self.xmpp, room, nick, password, histo_length, current_status.message, current_status.show, seconds=seconds) -- cgit v1.2.3