aboutsummaryrefslogtreecommitdiffstats
path: root/extras/scripts
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2021-03-11 15:12:29 -0500
committerDamjan Marion <dmarion@me.com>2021-03-15 17:34:40 +0000
commit592dbd0ad3b464d14aba7ccec918d5ed7f9429fc (patch)
tree3395f962424ebbccf09566eb5e2faf0884a5131f /extras/scripts
parent19ff0c3699342b512c03362b3815df684a661f49 (diff)
misc: finish removing deprecated cop API
Fix bug in crcchecker. It must be possible to remove a non-production .api file Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I00b953e58017cc53051e6f4d8a70403dce8219a0
Diffstat (limited to 'extras/scripts')
-rwxr-xr-xextras/scripts/crcchecker.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/extras/scripts/crcchecker.py b/extras/scripts/crcchecker.py
index fdaef21c27c..f3021c3c8b6 100755
--- a/extras/scripts/crcchecker.py
+++ b/extras/scripts/crcchecker.py
@@ -23,7 +23,8 @@ def crc_from_apigen(revision, filename):
all APIs in filename'''
if not revision and not os.path.isfile(filename):
print(f'skipping: {filename}', file=sys.stderr)
- return {}
+ # Return <class 'set'> instead of <class 'dict'>
+ return {-1}
if revision:
apigen = (f'{APIGENBIN} --git-revision {revision} --includedir src '
@@ -213,10 +214,12 @@ def check_patchset():
for filename in files:
# Ignore files that have version < 1.0.0
_ = crc_from_apigen(None, filename)
- if _['_version']['major'] == '0':
- continue
+ # Ignore removed files
+ if isinstance(_, set) == 0:
+ if isinstance(_, set) == 0 and _['_version']['major'] == '0':
+ continue
+ newcrcs.update(_)
- newcrcs.update(_)
oldcrcs.update(crc_from_apigen(revision, filename))
backwards_incompatible = report(newcrcs, oldcrcs)