Closed
Bug 1676729
Opened 4 years ago
Closed 4 years ago
mozdevice: if no device, handle gracefully
Categories
(Testing :: Mozbase, enhancement, P3)
Tracking
(firefox85 fixed)
RESOLVED
FIXED
85 Branch
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: aerickson, Assigned: bc)
References
Details
Attachments
(1 file)
If there's no device connected, a non-stack/error would be nice.
On mozdevice (4.0.2):
root@b81fc4cc21d1:~# python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mozdevice
>>> device = mozdevice.ADBDevice()
0:00.02 INFO Using adb 1.0.41
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/mozdevice/adb.py", line
707, in __init__
self._wait_for_boot_completed(timeout=timeout)
File "/usr/local/lib/python3.6/dist-packages/mozdevice/adb.py", line
961, in _wait_for_boot_completed
sys_boot_completed = self.shell_output('getprop
sys.boot_completed', timeout=timeout)
File "/usr/local/lib/python3.6/dist-packages/mozdevice/adb.py", line
1778, in shell_output
timeout=timeout, enable_run_as=enable_run_as)
File "/usr/local/lib/python3.6/dist-packages/mozdevice/adb.py", line
1651, in shell
if (self._device_serial.startswith('emulator') or
AttributeError: 'NoneType' object has no attribute 'startswith'
>>>
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → bob
Severity: -- → S4
Priority: -- → P3
Assignee | ||
Comment 1•4 years ago
|
||
Pushed by bclary@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab350bf3a1f7 [mozdevice] raise ADBError during ADBDevice initialization if no devices connected, r=aerickson.
Comment 3•4 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox85:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•