From 66e4243a14e382b08485f4e0cf8dea15ced4327a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 4 Aug 2012 14:18:53 +0200 Subject: [PATCH] Use 'future' division in src/ircutils.py. --- src/ircutils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ircutils.py b/src/ircutils.py index 07ceb3571..56aebbc0e 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -35,6 +35,8 @@ dicts, a nick class to handle nicks (so comparisons and hashing and whatnot work in an IRC-case-insensitive fashion), and numerous other things. """ +from __future__ import division + import re import time import random @@ -483,7 +485,7 @@ def dccIP(ip): x = 256**3 for quad in ip.split('.'): i += int(quad)*x - x /= 256 + x //= 256 return i def unDccIP(i): @@ -492,7 +494,7 @@ def unDccIP(i): L = [] while len(L) < 4: L.append(i % 256) - i /= 256 + i //= 256 L.reverse() return '.'.join(imap(str, L))