From 17af578d72e89016fa94d4dc97d58ceaa4a7c531 Mon Sep 17 00:00:00 2001 From: Cassidy Burden Date: Mon, 29 Jun 2015 14:51:35 -0700 Subject: [PATCH] Prevent repo info from crashing when default element doesn't exist. repo info will crash when using a manifest with no default element despite default being an optional element. Output nothing for "Manifest Branch" if no default element exists (or if no default revision exists). Change-Id: I7ebffa2408863837ba980f0ab6e593134400aea9 --- subcmds/info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subcmds/info.py b/subcmds/info.py index d42860ae..ed196e90 100644 --- a/subcmds/info.py +++ b/subcmds/info.py @@ -59,7 +59,8 @@ class Info(PagedCommand): or 'all,-notdefault') self.heading("Manifest branch: ") - self.headtext(self.manifest.default.revisionExpr) + if self.manifest.default.revisionExpr: + self.headtext(self.manifest.default.revisionExpr) self.out.nl() self.heading("Manifest merge branch: ") self.headtext(mergeBranch)