diff options
author | 2019-04-29 22:37:00 +0100 | |
---|---|---|
committer | 2019-04-29 22:37:00 +0100 | |
commit | 42dcfb8f577f71d2e9fa8ba8fd3a43ce44e21af5 (patch) | |
tree | bd91d41e1cba2f4e3ec8b6d493b1cf9f035c58e7 | |
parent | 46669aa717754cfd125da043eac71a9332ad5658 (diff) |
Handle removed classes when looking for deprecated at birth APIs.
Removed APIs cause a KeyError when looking them up in the current API
surface. Instead, check if they're there first and if not just move on
since they no longer exist.
Bug: 129975435
Test: looked for new and deprecated system APIs
Change-Id: I46daa83ec8376190112418720f848afdf7cd7df2
-rw-r--r-- | tools/apilint/apilint.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/apilint/apilint.py b/tools/apilint/apilint.py index 97ca6dc7bf34..f41426d84af1 100644 --- a/tools/apilint/apilint.py +++ b/tools/apilint/apilint.py @@ -2132,6 +2132,10 @@ def show_deprecations_at_birth(cur, prev): # Remove all existing things so we're left with new for prev_clazz in prev.values(): + if prev_clazz.fullname not in cur: + # The class was removed this release; we can safely ignore it. + continue + cur_clazz = cur[prev_clazz.fullname] if not is_interesting(cur_clazz): continue |