diff options
author | mathieui <mathieui@mathieui.net> | 2012-11-23 09:01:35 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-11-23 09:01:35 +0100 |
commit | 9e0fe54a496fa71b9bef87c1c19650dcc61060c5 (patch) | |
tree | 5ee5e5aaa482d9731fb3c3f3eb174448a5401216 /src | |
parent | ba569630f7dd9d818cc40b449716714e30e4b3d5 (diff) | |
download | poezio-9e0fe54a496fa71b9bef87c1c19650dcc61060c5.tar.gz poezio-9e0fe54a496fa71b9bef87c1c19650dcc61060c5.tar.bz2 poezio-9e0fe54a496fa71b9bef87c1c19650dcc61060c5.tar.xz poezio-9e0fe54a496fa71b9bef87c1c19650dcc61060c5.zip |
Fix the timedelta for python 3.1
Diffstat (limited to 'src')
-rw-r--r-- | src/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |