Fix Python 3 deprecated issues that cannot be resolved by 2to3.
This commit is contained in:
parent
b6ab044cd6
commit
30006b732a
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
from __future__ import division # 2.2+-only
|
||||||
"""
|
"""
|
||||||
Scyther : An automatic verifier for security protocols.
|
Scyther : An automatic verifier for security protocols.
|
||||||
Copyright (C) 2007 Cas Cremers
|
Copyright (C) 2007 Cas Cremers
|
||||||
@ -149,8 +150,8 @@ class AttackDisplay(wx.ScrolledWindow):
|
|||||||
self.box.Layout()
|
self.box.Layout()
|
||||||
|
|
||||||
step = 20
|
step = 20
|
||||||
xn = int(virtualwidth / step) + 1
|
xn = int(virtualwidth // step) + 1
|
||||||
yn = int(virtualheight / step) + 1
|
yn = int(virtualheight // step) + 1
|
||||||
self.SetScrollbars(step,step,xn,yn,0,0)
|
self.SetScrollbars(step,step,xn,yn,0,0)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -208,7 +208,7 @@ def init():
|
|||||||
def get(key,alt=None):
|
def get(key,alt=None):
|
||||||
global prefs
|
global prefs
|
||||||
|
|
||||||
if prefs.has_key(key):
|
if key in prefs.keys():
|
||||||
return prefs[key]
|
return prefs[key]
|
||||||
else:
|
else:
|
||||||
return alt
|
return alt
|
||||||
|
Loading…
Reference in New Issue
Block a user