Commit 9c4f09b
utils/android: Fix AdbConnection.execute(check_exit_code=False) default
Switch to have check_exit_code=True just like any other connection.
The current behavior will not raise any exception if the command returns
a non-zero exit code. This leads to failed attempt at parsing the
output, which is now an error message rather than the expected data.
Worse, the caller may never realize the command failed. This is
especially bad as that behavior will only manifest itself when things go
wrong, which is not the majority of the time, leading to code that seems
to work ok, but does not handle failure properly (like a shell script).
Lastly, since this is at odds with all the other connection types,
generic code will typically assume check_exit_code=True by default and
end up being buggy when used in conjunction of the AdbConnection.1 parent f71b6a7 commit 9c4f09b
2 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
487 | | - | |
| 486 | + | |
488 | 487 | | |
489 | 488 | | |
490 | 489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments