diff options
author | Hongguang Chen <hgchen@google.com> | 2020-07-30 23:46:28 -0700 |
---|---|---|
committer | Hongguang Chen <hgchen@google.com> | 2020-08-05 15:56:29 -0700 |
commit | 0482d26ce841bff62c8bec7524381304b3badda0 (patch) | |
tree | 6e700966fbde382cd6f62cb41d45e4fb7190d32a | |
parent | 70f90bff893e842f503f005779749cdaa32bbf6c (diff) | |
download | vndk-0482d26ce841bff62c8bec7524381304b3badda0.tar.gz |
Return empty file list when out is an empty string.
BUG: 162528556
Test: VtsKernelProcFileApiTest#testProcPerUidTimes
Change-Id: I86158d2af4736f2e6dc87f9bfab48b0496479548
-rw-r--r-- | utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -247,4 +247,7 @@ class AndroidDevice(object): if return_code != 0 or err.strip(): raise IOError("`find %s -name '%s' %s` stdout: %s\nstderr: %s" % (path, name_pattern, " ".join(options), out, err)) - return out.strip().split("\n") + + # Return empty file list when out is an empty string. + out = out.strip() + return out.split("\n") if out else [] |