Skip to content

Commit 10912f3

Browse files
author
Vasil Hristov
authored
Add try catch for process kill. (#348)
1 parent 4db9fbc commit 10912f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/utils/device/adb.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def get_logcat(device_id):
5959
command_result = Adb.run_adb_command(command='logcat -d', device_id=device_id, wait=False)
6060
time.sleep(15)
6161
result = File.read(command_result.log_file)
62-
os.kill(command_result.pid, 0)
62+
try:
63+
os.kill(command_result.pid, 0)
64+
except OSError:
65+
Log.info('Process already killed...')
6366
return result
6467

6568
@staticmethod

0 commit comments

Comments
 (0)