get_maintainer.py: add OP-TEE mailing list(s) to --release-to

The release annoucements should be sent to the general OP-TEE mailing
list(s), in addition to the maintainers and reviewers. Add the needed
bits to extract this information.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 3431fea..77fa9c6 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -48,8 +48,8 @@
                         'file and process it.')
     parser.add_argument('-r', '--release-to', action='store_true',
                         help='show all the recipients to be used in release '
-                        'announcement emails (i.e., maintainers and reviewers)'
-                        'and exit.')
+                        'announcement emails (i.e., maintainers, reviewers '
+                        'and OP-TEE mailing list(s)) and exit.')
     return parser.parse_args()
 
 
@@ -211,6 +211,10 @@
     return get_ss_maintainers(ss) + get_ss_reviewers(ss)
 
 
+def get_ss_lists(subsys):
+    return subsys.get('L') or []
+
+
 def approvers_have_approved(approved_by, approvers):
     for n in approvers:
         # Ignore anything after the email (Github ID...)
@@ -232,11 +236,12 @@
     return f.name
 
 
-def show_release_to():
+def show_release_to(subsystems):
     check_cwd()
     with open("MAINTAINERS", "r") as f:
         emails = sorted(set(re.findall(r'[RM]:\t(.*[\w]*<[\w\.-]+@[\w\.-]+>)',
                                        f.read())))
+        emails += get_ss_lists(subsystems["THE REST"])
     print(*emails, sep=', ')
 
 
@@ -245,11 +250,12 @@
 
     args = get_args()
 
+    all_subsystems = parse_maintainers()
+
     if args.release_to:
-        show_release_to()
+        show_release_to(all_subsystems)
         return
 
-    all_subsystems = parse_maintainers()
     paths = []
     arglist = []
     downloads = []