Skip to content

Commit 96eaad4

Browse files
committed
[py]: use str(...) in place of __str__(...)
1 parent a29c584 commit 96eaad4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

py/selenium/webdriver/remote/webelement.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,11 @@ def _upload(self, filename):
457457
try:
458458
return self._execute(Command.UPLOAD_FILE, {'file': content})['value']
459459
except WebDriverException as e:
460-
if "Unrecognized command: POST" in e.__str__():
460+
if "Unrecognized command: POST" in str(e):
461461
return filename
462-
elif "Command not found: POST " in e.__str__():
462+
elif "Command not found: POST " in str(e):
463463
return filename
464-
elif '{"status":405,"value":["GET","HEAD","DELETE"]}' in e.__str__():
464+
elif '{"status":405,"value":["GET","HEAD","DELETE"]}' in str(e):
465465
return filename
466466
else:
467467
raise

0 commit comments

Comments
 (0)