You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/12 15:13:14 UTC

[incubator-ponymail-foal] branch master updated: Check a single name

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new e1f6abb  Check a single name
e1f6abb is described below

commit e1f6abb8a970ca3faa798a0ece29d63b464859ef
Author: Sebb <se...@apache.org>
AuthorDate: Sun Dec 12 15:13:03 2021 +0000

    Check a single name
---
 tools/mappings.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/mappings.py b/tools/mappings.py
index 9d317fe..a3e2740 100755
--- a/tools/mappings.py
+++ b/tools/mappings.py
@@ -45,6 +45,7 @@ parser.add_argument(
     action="store_true",
     help="Create the missing mapping(s)",
 )
+parser.add_argument('names', nargs='*')
 args = parser.parse_args()
 
 def check_mapping(index):
@@ -58,6 +59,7 @@ def check_mapping(index):
   if mappings == mappings_expected:
     print("Mappings are as expected, hoorah!")
   else:
+    print("Mappings differ:")
     unexpected = set(mappings) - set(mappings_expected)
     for name in unexpected:
       data = {name: mappings[name]}
@@ -71,7 +73,6 @@ def check_mapping(index):
       else:
         print("Missing: " + str(data))
 
-
-for type in mapping_file.keys():
+for type in args.names if len(args.names) > 0 else mapping_file.keys():
   print("Checking " + type)
   check_mapping(type)
\ No newline at end of file