diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-09-22 15:11:51 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-09-23 08:09:54 +0000 |
commit | 6a3d4cc9a11efbe73a1cda35a64c619eebde0b24 (patch) | |
tree | d669cc2362139b9fa25d20fe962e2cd880d8298e /extras/scripts/crcchecker.py | |
parent | 5b7ea9122e5d9efc632633909933347c98cf3bfc (diff) |
vppapigen: crcchecker: harmonize the in_progress marking
The format for deprecation is "option deprecated" now,
so harmonize the in-progress marking to logically be
"option in_progress"
At the same time recognize the legacy/erroneous
types of marking, print the warning.
Change-Id: If418dfadd69ffb112550164d63d13420e51cefd7
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'extras/scripts/crcchecker.py')
-rwxr-xr-x | extras/scripts/crcchecker.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/extras/scripts/crcchecker.py b/extras/scripts/crcchecker.py index 7929374c5c8..2b026338129 100755 --- a/extras/scripts/crcchecker.py +++ b/extras/scripts/crcchecker.py @@ -96,16 +96,24 @@ def filelist_from_patchset(): return set(filelist) def is_deprecated(d, k): - if 'options' in d[k] and 'deprecated' in d[k]['options']: - return True + if 'options' in d[k]: + if 'deprecated' in d[k]['options']: + return True + # recognize the deprecated format + if 'status' in d[k]['options'] and d[k]['options']['status'] == 'deprecated': + print("WARNING: please use 'option deprecated;'") + return True return False def is_in_progress(d, k): - try: - if d[k]['options']['status'] == 'in_progress': + if 'options' in d[k]: + if 'in_progress' in d[k]['options']: + return True + # recognize the deprecated format + if 'status' in d[k]['options'] and d[k]['options']['status'] == 'in_progress': + print("WARNING: please use 'option in_progress;'") return True - except: - return False + return False def report(new, old): added, removed, modified, same = dict_compare(new, old) |