Skip to content

Commit

Permalink
ide: Making generated python code more python 2 and 3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Mar 15, 2015
1 parent 348404c commit d2ee05b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function assertFalse(expression) {

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

function verifyTrue(expression) {
Expand Down
4 changes: 2 additions & 2 deletions ide/plugins/python-format/src/content/formats/python2-wd.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ this.options = {
' \n' +
' def is_element_present(self, how, what):\n' +
' try: self.driver.find_element(by=how, value=what)\n' +
' except NoSuchElementException, e: return False\n' +
' except NoSuchElementException as e: return False\n' +
' return True\n' +
' \n' +
' def is_alert_present(self):\n' +
' try: self.driver.switch_to_alert()\n' +
' except NoAlertPresentException, e: return False\n' +
' except NoAlertPresentException as e: return False\n' +
' return True\n' +
' \n' +
' def close_alert_and_get_its_text(self):\n' +
Expand Down

0 comments on commit d2ee05b

Please sign in to comment.