diff options
author | Marat Dukhan <marat@fb.com> | 2018-03-20 12:57:51 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2018-03-20 12:57:59 -0700 |
commit | 8ed9637fa592330d64e76f72f4d85b01483520f4 (patch) | |
tree | 1781e54760e4f85af21f9702e0b25200a27b19da /scripts | |
parent | 7d52b05f6c46d2e05c962b7541717d23816f0a04 (diff) | |
download | cpuinfo-8ed9637fa592330d64e76f72f4d85b01483520f4.tar.gz |
Fix Android dump script for non-Qualcomm systems
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/android-filesystem-dump.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/android-filesystem-dump.py b/scripts/android-filesystem-dump.py index 9e2f17c..6014e1b 100755 --- a/scripts/android-filesystem-dump.py +++ b/scripts/android-filesystem-dump.py @@ -246,9 +246,10 @@ def adb_pull(device_path, local_path): if any(device_path.startswith(prefix) for prefix in SHELL_PREFIX): content = adb_shell(["cat", device_path]) if content is not None: - with open(local_path, "wb") as local_file: - local_file.write(content) - return content is not None + if not content.rstrip().endswith("No such file or directory"): + with open(local_path, "wb") as local_file: + local_file.write(content) + return True else: env = os.environ.copy() env["LC_ALL"] = "C" |