Closed
Bug 1041424
Opened 11 years ago
Closed 11 years ago
[mozrunner] Improve exception when instantiating B2GDeviceRunner with no devices attached/detected
Categories
(Testing :: Mozbase, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla34
People
(Reporter: davehunt, Assigned: jgraham)
Details
Attachments
(1 file)
|
1.99 KB,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
If ADB cannot detect any devices we should give a helpful message suggesting that none were found instead of the current IndexError: list index out of range:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dhunt/workspace/mozilla/mozilla-central/testing/mozbase/mozrunner/mozrunner/base/device.py", line 69, in start
self.device.connect()
File "/Users/dhunt/workspace/mozilla/mozilla-central/testing/mozbase/mozrunner/mozrunner/devices/base.py", line 127, in connect
serial = self.serial or self._get_online_devices()[0]
IndexError: list index out of range
To replicate:
from mozrunner import B2GDeviceRunner
B2GDeviceRunner().start()
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8459561 -
Flags: review?(ahalberstadt)
Comment 2•11 years ago
|
||
Comment on attachment 8459561 [details] [diff] [review]
Raise a helpful exception if B2GDeviceRunner is used with no devices attached.
Review of attachment 8459561 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for fixing this!
Attachment #8459561 -
Flags: review?(ahalberstadt) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•