Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ensure_dependencies.py

Issue 5652679430766592: Issue 2443 - Honour SKIP_DEPENDENCY_UPDATES environment variable (Closed)
Patch Set: Ignore falsey values. Created May 5, 2015, 1:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ensure_dependencies.py
diff --git a/ensure_dependencies.py b/ensure_dependencies.py
index b6557d051f6661645dea95edfde280ea288f7533..94e2410b2e44516a3146b2a4ebc44adcd9899bfe 100755
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -297,6 +297,10 @@ def _ensure_line_exists(path, pattern):
if __name__ == "__main__":
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
+ if os.environ.get("SKIP_ENSURE_DEPENDENCIES", "").lower() not in ("", "0", "false"):
+ logging.warning("SKIP_ENSURE_DEPENDENCIES environment variable set, skipping.")
+ sys.exit()
+
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")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld