Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appium/webdriver/appium_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _get_main_script(self) -> Union[str, bytes]:
'-e',
'console.log(require.resolve("{}"))'.format(MAIN_SCRIPT_PATH)]).strip()
except sp.CalledProcessError as e:
raise AppiumServiceError(e.output)
raise AppiumServiceError(e.output) from e
return self._main_script

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion appium/webdriver/errorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ def check_response(self, response: Dict) -> None:
super().check_response(response)
except WebDriverException as wde:
if wde.msg == 'No such context found.':
raise NoSuchContextException(wde.msg, wde.screen, wde.stacktrace)
raise NoSuchContextException(wde.msg, wde.screen, wde.stacktrace) from wde
else:
raise wde
4 changes: 2 additions & 2 deletions appium/webdriver/extensions/remote_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def push_file(self, destination_path: str,
try:
with open(source_path, 'rb') as f:
file_data = f.read()
except IOError:
except IOError as e:
message = f'source_path "{source_path}" could not be found. Are you sure the file exists?'
raise InvalidArgumentException(message)
raise InvalidArgumentException(message) from e
base64data = base64.b64encode(file_data).decode('utf-8')

data = {
Expand Down