Closed Bug 1034406 Opened 7 years ago Closed 7 years ago

[mozdevice] Do not allow ADBCommand to be instantiated.

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: bc, Assigned: bc)

References

Details

Attachments

(1 file)

As part of the review process for bug 1007220 when adb.py was incorporated into Autophone, there were concerns about confusion with the use of ADBCommand which was not intended to be directly instantiated. As a result, this patch makes ADBCommand raise a NotImplementedError if instantiated, and adds additional comments to clarify the usage.

A couple of other changes were incorporated:

1. fix to the ADBHost.kill_server in mozdevice.rst where cmds was incorrectly listed as an 
   argument.
2. fix to possible bug in ADBDevice.shell to return the proper exitcode in case the adb process exited with a non-zero exitcode.

wlach, this is the same code as in bug 1007220. If we want to try abstract base classes, can we deal with that in a separate bug?
Attachment #8450721 - Flags: review?(wlachance)
Comment on attachment 8450721 [details] [diff] [review]
incorporate-bug-1007220.patch

Review of attachment 8450721 [details] [diff] [review]:
-----------------------------------------------------------------

Yup, that's fine with me.
Attachment #8450721 - Flags: review?(wlachance) → review+
https://hg.mozilla.org/mozilla-central/rev/b2535c273dc4
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.