Skip to content

Commit

Permalink
Merge pull request #41 from aloetesting/fix-syntax
Browse files Browse the repository at this point in the history
Don't use "elif" after "raise"
  • Loading branch information
koterpillar committed Mar 1, 2019
2 parents e512418 + 2aea44e commit 65d847d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aloe_webdriver/util.py
Expand Up @@ -42,7 +42,8 @@ def string_literal(content):
if '"' in content and "'" in content:
# there is no way to escape string literal characters in XPath
raise ValueError("Cannot represent this string in XPath")
elif '"' in content: # if it contains " wrap it in '

if '"' in content: # if it contains " wrap it in '
content = "'%s'" % content
else: # wrap it in "
content = '"%s"' % content
Expand Down

0 comments on commit 65d847d

Please sign in to comment.