Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 4cf996f134a724e9ad7a17825cf69b57eb6804bd..f81a446867e38bdc5f3ba4bc0c19a47aee82b3a6 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -1001,10 +1001,7 @@ class AndroidCommands(object): |
if host_path_mtime == os.stat(host_path).st_mtime: |
return |
- def GetHostSize(path): |
- return int(cmd_helper.GetCmdOutput(['du', '-sb', path]).split()[0]) |
- |
- size = GetHostSize(host_path) |
+ size = os.stat(host_path).st_size |
self._pushed_files.append(device_path) |
self._potential_push_size += size |
@@ -1039,7 +1036,7 @@ class AndroidCommands(object): |
diff_size = 0 |
if len(changed_files) <= MAX_INDIVIDUAL_PUSHES: |
- diff_size = sum(GetHostSize(f[0]) for f in changed_files) |
+ diff_size = sum(os.stat(f[0]).st_size for f in changed_files) |
craigdh
2014/03/24 19:19:54
This doesn't work for directories.
|
# TODO(craigdh): Replace this educated guess with a heuristic that |
# approximates the push time for each method. |