-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ndk-gdb fails with -f #1764
Comments
This is another Python 2 -> Python 3 conversion problem just like #1763: The current code is as follows: kill_pids = map(str, kill_pids)
if kill_pids:
log("Killing processes: {}".format(", ".join(kill_pids)))
device.shell_nocheck(["run-as", pkg_name, "kill", "-9"] + kill_pids) In Python 2, kill_pids = [str(pid) for pid in kill_pids] EDIT: You can however also use |
Whoever fixes this should extend our pylint check over this script. Pylint would have caught this. |
@appujee has uploaded a fix here: https://android-review.git.corp.google.com/c/platform/ndk/+/2579812 (thanks!) Will leave the bug open for myself to extend pylint coverage and to update the changelog. |
https://r.android.com/c/platform/ndk/+/2579812 link for non-Googlers. There's actually a nicer way to write this now, using the splat operator to expand one array within another array: kill_pids = [str(pid) for pid in kill_pids]
if kill_pids:
log("Killing processes: {}".format(", ".join(kill_pids)))
device.shell_nocheck(["run-as", pkg_name, "kill", "-9", *kill_pids]) (Notice the splat operator on the last line) Regarding pylint, I've seen some of the many Python linters recommend using the splat operator over |
Ugh. Sorry. A while ago someone decided that my URL bar should be rewritten to something useless. I don't always remember to rewrite it by hand before pasting. |
The fix for this appears to have been in r26 beta 1 and I just forgot to add it to the changelog. In any case it's certainly in RC 1 (and I've updated the changelog). |
Description
When running
ndk-gdb -f
:Affected versions
r25
Canary version
No response
Host OS
Windows
Host OS version
n/a
Affected ABIs
armeabi-v7a, arm64-v8a, x86, x86_64
Build system
Other (specify below)
Other build system
No response
minSdkVersion
n/a
Device API level
No response
The text was updated successfully, but these errors were encountered: