From d46d026f1b4d52759a55ddfe094df1874743e446 Mon Sep 17 00:00:00 2001 From: Juan Date: Wed, 8 May 2024 13:48:01 -0300 Subject: [PATCH] Raise DeviceLockedError when launching app --- pymobiledevice3/services/dvt/instruments/process_control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymobiledevice3/services/dvt/instruments/process_control.py b/pymobiledevice3/services/dvt/instruments/process_control.py index 12f7f58ad..ece833803 100644 --- a/pymobiledevice3/services/dvt/instruments/process_control.py +++ b/pymobiledevice3/services/dvt/instruments/process_control.py @@ -3,7 +3,7 @@ import sys import typing -from pymobiledevice3.exceptions import DeviceHasPasscodeSetError, DvtException +from pymobiledevice3.exceptions import DvtException, DeviceLockedError from pymobiledevice3.services.dvt.dvt_secure_socket_proxy import DvtSecureSocketProxyService from pymobiledevice3.services.remote_server import MessageAux @@ -79,7 +79,7 @@ def launch(self, bundle_id: str, arguments=None, kill_existing: bool = True, sta result = self._channel.receive_plist() except DvtException as exc: error = exc.args[0]["NSLocalizedFailureReason"] - raise DeviceHasPasscodeSetError() if "the device was not, or could not be, unlocked" in error else error + raise DeviceLockedError() if "the device was not, or could not be, unlocked" in error else error assert result return result