Skip to content

Commit d2ee05b

Browse files
committed
ide: Making generated python code more python 2 and 3 compatible
1 parent 348404c commit d2ee05b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: ide/plugins/python-format/src/content/formats/python2-rc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function assertFalse(expression) {
3939

4040
function verify(statement) {
4141
return "try: " + statement + "\n" +
42-
"except AssertionError, e: self.verificationErrors.append(str(e))";
42+
"except AssertionError as e: self.verificationErrors.append(str(e))";
4343
}
4444

4545
function verifyTrue(expression) {

Diff for: ide/plugins/python-format/src/content/formats/python2-wd.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ this.options = {
315315
' \n' +
316316
' def is_element_present(self, how, what):\n' +
317317
' try: self.driver.find_element(by=how, value=what)\n' +
318-
' except NoSuchElementException, e: return False\n' +
318+
' except NoSuchElementException as e: return False\n' +
319319
' return True\n' +
320320
' \n' +
321321
' def is_alert_present(self):\n' +
322322
' try: self.driver.switch_to_alert()\n' +
323-
' except NoAlertPresentException, e: return False\n' +
323+
' except NoAlertPresentException as e: return False\n' +
324324
' return True\n' +
325325
' \n' +
326326
' def close_alert_and_get_its_text(self):\n' +

0 commit comments

Comments
 (0)