Replace long() in remaining python2 code with int().

This commit is contained in:
Emmanuel Gil Peyrot 2017-02-07 21:14:25 +00:00
parent 381a8f2be8
commit 1f9ac730ce
3 changed files with 5 additions and 5 deletions

View File

@ -435,8 +435,8 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
# it's an IPv6
return True
ip_s = ip.split('.')
ip_l = long(ip_s[0])<<24 | long(ip_s[1])<<16 | long(ip_s[2])<<8 | \
long(ip_s[3])
ip_l = int(ip_s[0])<<24 | int(ip_s[1])<<16 | int(ip_s[2])<<8 | \
int(ip_s[3])
# 10/8
if ip_l & (255<<24) == 10<<24:
return True

View File

@ -553,7 +553,7 @@ class EncryptedStanzaSession(ArchivingStanzaSession):
n, e = (crypto.decode_mpi(base64.b64decode(
keyvalue.getTagData(x))) for x in ('Modulus', 'Exponent'))
eir_pubkey = RSA.construct((n, long(e)))
eir_pubkey = RSA.construct((n, int(e)))
pubkey_o = nbxmpp.c14n.c14n(keyvalue, self._is_buggy_gajim())
else:

View File

@ -698,7 +698,7 @@ class SignalObject(dbus.service.Object):
if self._is_first():
win.window.focus(Gtk.get_current_event_time())
else:
win.window.focus(long(time()))
win.window.focus(int(time()))
@dbus.service.method(INTERFACE, in_signature='', out_signature='')
def show_roster(self):
@ -711,7 +711,7 @@ class SignalObject(dbus.service.Object):
if self._is_first():
win.window.focus(Gtk.get_current_event_time())
else:
win.window.focus(long(time()))
win.window.focus(int(time()))
@dbus.service.method(INTERFACE, in_signature='', out_signature='')
def toggle_ipython(self):