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
diff --git a/subcmds/info.py b/subcmds/info.py
index d42860a..ed196e9 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -59,7 +59,8 @@
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)