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

Unified Diff: ensure_dependencies.py

Issue 29356341: Issue 4503 - ensure_dependencies.py fails for git submodule
Patch Set: Created Oct. 7, 2016, 11:54 a.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 d8af9e718b27d802acd7cde70301341220c6f7eb..9ef73941261c817ea7f428ac7f5cab88338ec41a 100755
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -102,7 +102,13 @@ class Git():
def ignore(self, target, repo):
module = os.path.relpath(target, repo)
exclude_file = os.path.join(repo, ".git", "info", "exclude")
- _ensure_line_exists(exclude_file, module)
+ try:
+ _ensure_line_exists(exclude_file, module)
+ except IOError, e:
+ if e.errno != errno.ENOENT and e.errno != errno.ENOTDIR:
+ raise
+ logging.warning("File %s doesn't exist, skipping ignore" % exclude_file)
+ return
repo_types = OrderedDict((
("hg", Mercurial()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld