Bug 1634717 - Reduce scope of import of psutil in android_device.py; r=jmaher

Trivial change to reduce import dependencies for most callers.

Differential Revision: https://phabricator.services.mozilla.com/D73468
This commit is contained in:
Geoff Brown 2020-05-01 18:24:48 +00:00
Родитель 08e6a50949
Коммит 086057c9bf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -17,7 +17,6 @@ import time
from distutils.spawn import find_executable
from enum import Enum
import psutil
from mozdevice import ADBHost, ADBDevice
from six.moves import input, urllib
@ -369,7 +368,8 @@ class AndroidEmulator(object):
"""
Returns True if the Android emulator is running.
"""
for proc in psutil.process_iter():
from psutil import process_iter
for proc in process_iter():
try:
name = proc.name()
# On some platforms, "emulator" may start an emulator with