Fix Python 3 deprecated issues that cannot be resolved by 2to3.

This commit is contained in:
Cas Cremers 2012-04-23 15:01:15 +02:00
parent b6ab044cd6
commit 30006b732a
2 changed files with 4 additions and 3 deletions

View File

@ -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)
""" """

View File

@ -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