Use newer form of catching exceptions
autopep8 -i --select=W602 Also some other minor deprecated syntax changes, like "while 1". I did not commit the less obvious changes.
This commit is contained in:
parent
fb1b8bc5b8
commit
a6ad7e83ff
72 changed files with 151 additions and 154 deletions
|
|
@ -133,7 +133,7 @@ class Ing(BaseBrowser):
|
|||
|
||||
index = 0 # index, we get always the same page, but with more informations
|
||||
hashlist = []
|
||||
while 1:
|
||||
while True:
|
||||
i = index
|
||||
for transaction in self.page.get_transactions(index):
|
||||
while transaction.id in hashlist:
|
||||
|
|
@ -227,7 +227,7 @@ class Ing(BaseBrowser):
|
|||
"transfer_issuer_radio": subscription.id
|
||||
}
|
||||
self.location(self.billpage, urllib.urlencode(data))
|
||||
while 1:
|
||||
while True:
|
||||
for bill in self.page.iter_bills(subscription.id):
|
||||
yield bill
|
||||
if self.page.islast():
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class LoginPage(BasePage):
|
|||
# 2) And now, the virtual Keyboard
|
||||
try:
|
||||
vk = INGVirtKeyboard(self)
|
||||
except VirtKeyboardError, err:
|
||||
except VirtKeyboardError as err:
|
||||
error("Error: %s" % err)
|
||||
return False
|
||||
realpasswd = ""
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ class TransferConfirmPage(BasePage):
|
|||
def confirm(self, password):
|
||||
try:
|
||||
vk = INGVirtKeyboard(self)
|
||||
except VirtKeyboardError, err:
|
||||
except VirtKeyboardError as err:
|
||||
error("Error: %s" % err)
|
||||
return
|
||||
realpasswd = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue