Index: build/android/gyp/util/md5_check.py |
diff --git a/build/android/gyp/util/md5_check.py b/build/android/gyp/util/md5_check.py |
index 2ddc3ac48a18f1e4c3e9f11178f6d88da1461709..a68bdc9d3699990d86d0519a642055e74b3ee0a3 100644 |
--- a/build/android/gyp/util/md5_check.py |
+++ b/build/android/gyp/util/md5_check.py |
@@ -340,9 +340,12 @@ class _Metadata(object): |
def IterSubpaths(self, path): |
"""Returns a generator for all subpaths in the given zip. |
- If the given path is not a zip file, returns an empty generator. |
+ If the given path is not a zip file or doesn't exist, returns an empty |
+ iterable. |
""" |
outer_entry = self._GetEntry(path) |
+ if not outer_entry: |
+ return () |
subentries = outer_entry.get('entries', []) |
return (entry['path'] for entry in subentries) |