summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2019-10-01 01:01:33 -0400
committerMike Frysinger <vapier@google.com>2019-10-01 05:53:09 +0000
commit9775a3d5d2dcba0b33fbcf6a911b924be8f9a6e7 (patch)
tree426afecc73cdad3a2df7c9660c131bb78233a77f
parent9bfdfbe117d16107e07e1c376fec8eb245aab424 (diff)
downloadgit-repo-9775a3d5d2dcba0b33fbcf6a911b924be8f9a6e7.tar.gz
info: allow NoSuchProjectError to bubble up
If the user passes in bad projects like `repo info asdf`, we currently silently swallow those and do nothing. Allow NoSuchProjectError to bubble up to main which will handle & triage this correctly for us. Change-Id: Ie04528e7b7a164293063a636813a73eaabdd5bc3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239238 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
-rw-r--r--subcmds/info.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/subcmds/info.py b/subcmds/info.py
index be5a8f2a..0d5696dd 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -16,7 +16,6 @@
16 16
17from command import PagedCommand 17from command import PagedCommand
18from color import Coloring 18from color import Coloring
19from error import NoSuchProjectError
20from git_refs import R_M 19from git_refs import R_M
21 20
22class _Coloring(Coloring): 21class _Coloring(Coloring):
@@ -82,10 +81,8 @@ class Info(PagedCommand):
82 self.out.nl() 81 self.out.nl()
83 82
84 def printDiffInfo(self, args): 83 def printDiffInfo(self, args):
85 try: 84 # We let exceptions bubble up to main as they'll be well structured.
86 projs = self.GetProjects(args) 85 projs = self.GetProjects(args)
87 except NoSuchProjectError:
88 return
89 86
90 for p in projs: 87 for p in projs:
91 self.heading("Project: ") 88 self.heading("Project: ")