]> Savannah Git Hosting - gnulib.git/commitdiff
pygnulib.py: show banner notices
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 29 Sep 2017 07:16:29 +0000 (10:16 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Fri, 29 Sep 2017 07:16:29 +0000 (10:16 +0300)
pygnulib.py

index 21a4608ae5bfda1b20b48f9f27be2aa4fedd91d3..1aab3b3a8dbd47c6d87f777719fac169d07db482 100755 (executable)
@@ -102,6 +102,15 @@ def import_hook(script, gnulib, namespace, verbosity, options, *args, **kwargs):
             print(" " * 16, "{0:50}{1}".format(name, " ".join(sorted(licenses))), file=sys.stderr)
         print("{0}: *** Stop.".format(script), file=sys.stderr)
         return os.EX_DATAERR
+
+    # Show banner notice of every module.
+    if verbosity >= 1:
+        for module in sorted(main):
+            name = module.name
+            notice = module.notice
+            if notice.strip():
+                print("Notice from module {0}:".format(name), file=sys.stdout)
+                print("\n".join("  " + line for line in notice.splitlines()), file=sys.stdout)
     return os.EX_OK