[edk2-devel] [PATCH v2 2/4] BaseTools/PatchCheck.py: Let EmailAddressCheck describe email checked
Philippe Mathieu-Daudé
philmd at redhat.com
Mon Jan 6 10:35:26 UTC 2020
We are checking different emails from the signature list. We are
going to check more. To be able to differency, add a description
field, so the error reported is clearer.
Cc: Liming Gao <liming.gao at intel.com>
Cc: Jordan Justen <jordan.l.justen at intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd at redhat.com>
---
BaseTools/Scripts/PatchCheck.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 0e654345fcc8..a0ff5ec0038a 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -25,18 +25,22 @@ class Verbose:
class EmailAddressCheck:
"""Checks an email address."""
- def __init__(self, email):
+ def __init__(self, email, description):
self.ok = True
if email is None:
self.error('Email address is missing!')
return
+ if description is None:
+ self.error('Email description is missing!')
+ return
+ self.description = "'" + description + "'"
self.check_email_address(email)
def error(self, *err):
if self.ok and Verbose.level > Verbose.ONELINE:
- print('The email address is not valid:')
+ print('The ' + self.description + ' email address is not valid:')
self.ok = False
if Verbose.level < Verbose.NORMAL:
return
@@ -173,7 +177,7 @@ class CommitMessageCheck:
if s[2] != ' ':
self.error("There should be a space after '" + sig + ":'")
- EmailAddressCheck(s[3])
+ EmailAddressCheck(s[3], sig)
return sigs
--
2.21.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#52887): https://edk2.groups.io/g/devel/message/52887
Mute This Topic: https://groups.io/mt/69462075/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list