diff options
Diffstat (limited to 'git_remote_helpers/git/repo.py')
-rw-r--r-- | git_remote_helpers/git/repo.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git_remote_helpers/git/repo.py b/git_remote_helpers/git/repo.py index 82d5f78c7e..58e1cdb560 100644 --- a/git_remote_helpers/git/repo.py +++ b/git_remote_helpers/git/repo.py @@ -19,7 +19,10 @@ def is_remote(url): prefixes = ["http", "file", "git"] - return any(url.startswith(i) for i in prefixes) + for prefix in prefixes: + if url.startswith(prefix): + return True + return False class GitRepo(object): """Repo object representing a repo. @@ -50,7 +53,9 @@ class GitRepo(object): path = ".cached_revs" ofile = open(path, "w") - subprocess.check_call(args, stdout=ofile) + child = subprocess.Popen(args, stdout=ofile) + if child.wait() != 0: + raise CalledProcessError output = open(path).readlines() self.revmap = dict(sanitize(i) for i in output) if "HEAD" in self.revmap: |