diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py index 1361fb6c0e30..8097ba4e7bd6 100644 --- a/BaseTools/Scripts/GetMaintainer.py +++ b/BaseTools/Scripts/GetMaintainer.py @@ -192,14 +192,16 @@ def get_modified_files(repo, args): else: FILES = get_modified_files(REPO, ARGS) - ADDRESSES = [] - + # Accumulate a sorted list of addresses + ADDRESSES = set([]) for file in FILES: print(file) recipients = get_maintainers(file, SECTIONS) - ADDRESSES += recipients['maintainers'] + recipients['reviewers'] + recipients['lists'] + ADDRESSES |= set(recipients['maintainers'] + recipients['reviewers'] + recipients['lists']) + ADDRESSES = list(ADDRESSES) + ADDRESSES.sort() - for address in list(OrderedDict.fromkeys(ADDRESSES)): + for address in ADDRESSES: if '<' in address and '>' in address: address = address.split('>', 1)[0] + '>' print(' %s' % address)