Catch correct exception type

bzr-revno: 835
This commit is contained in:
Jon Tibble 2010-06-07 14:39:40 +01:00
commit c481cf5c8c
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class OpenLPToolbar(QtGui.QToolBar):
try:
if self.icons[title]:
return self.icons[title]
except NameError:
except KeyError:
log.exception(u'getIconFromTitle - no icon for %s' % title)
return QtGui.QIcon()