From 141c8d304b2f428a21e2141c481e35d94d909905 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 24 Dec 2011 11:53:59 +0100 Subject: [PATCH] Remove py3k deprecation warning about classic int division --- src/qweechat/weechat/protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qweechat/weechat/protocol.py b/src/qweechat/weechat/protocol.py index 099b44d..28feb3d 100644 --- a/src/qweechat/weechat/protocol.py +++ b/src/qweechat/weechat/protocol.py @@ -87,7 +87,7 @@ class WeechatMessage: if self.compression != 0: return 'size: %d/%d (%d%%), id=\'%s\', objects:\n%s' % ( self.size, self.size_uncompressed, - 100 - ((self.size * 100) / self.size_uncompressed), + 100 - ((self.size * 100) // self.size_uncompressed), self.msgid, self.objects) else: return 'size: %d, id=\'%s\', objects:\n%s' % (self.size, self.msgid, self.objects) @@ -280,7 +280,7 @@ class Protocol: def hex_and_ascii(data, bytes_per_line=10): """Convert a QByteArray to hex + ascii output.""" - num_lines = ((len(data) - 1) / bytes_per_line) + 1 + num_lines = ((len(data) - 1) // bytes_per_line) + 1 if num_lines == 0: return '' lines = []