[Pkg-mozext-commits] [adblock-plus] 38/52: Issue 1807 - Allow suppressing output of ensure_dependencies.py
David Prévot
taffit at moszumanska.debian.org
Thu Jan 22 21:43:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 46ec5c283a54e751174d050681e65e931748f868
Author: Wladimir Palant <trev at adblockplus.org>
Date: Wed Jan 14 22:13:51 2015 +0100
Issue 1807 - Allow suppressing output of ensure_dependencies.py
---
ensure_dependencies.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ensure_dependencies.py b/ensure_dependencies.py
index f4dac11..21a237d 100755
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -14,6 +14,7 @@ import errno
import logging
import subprocess
import urlparse
+import argparse
from collections import OrderedDict
from ConfigParser import RawConfigParser
@@ -278,7 +279,16 @@ def _ensure_line_exists(path, pattern):
if __name__ == "__main__":
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
- repos = sys.argv[1:]
+
+ parser = argparse.ArgumentParser(description="Verify dependencies for a set of repositories, by default the repository of this script.")
+ parser.add_argument("repos", metavar="repository", type=str, nargs="*", help="Repository path")
+ parser.add_argument("-q", "--quiet", action="store_true", help="Suppress informational output")
+ args = parser.parse_args()
+
+ if args.quiet:
+ logging.disable(logging.INFO)
+
+ repos = args.repos
if not len(repos):
repos = [os.path.dirname(__file__)]
for repo in repos:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list