Fix crash on opening a change with missing commits

When on the change screen, if navigating to a change missing
commits, display the error in a dialog rather than crash.

Change-Id: I560e17241bcb43a91093c13fafd18aa54d215e13
This commit is contained in:
James E. Blair 2015-04-07 12:46:34 -07:00
parent ddd2088e57
commit dfff0e8fc3
1 changed files with 4 additions and 1 deletions

View File

@ -332,7 +332,10 @@ class ChangeButton(mywid.FixedButton):
super(ChangeButton, self).set_label(text)
def openChange(self):
self.change_view.app.changeScreen(ChangeView(self.change_view.app, self.change_key))
try:
self.change_view.app.changeScreen(ChangeView(self.change_view.app, self.change_key))
except gertty.view.DisplayError as e:
self.change_view.app.error(e.message)
class ChangeMessageBox(mywid.HyperText):
def __init__(self, app, message):