Teach create_layout() how to fail more gracefully, so DBus requests for non-existant layouts can't bring everything down

This commit is contained in:
Chris Jones 2011-08-24 20:00:51 +01:00
parent 2590b36a75
commit e4f125b441

View File

@ -163,7 +163,8 @@ class Terminator(Borg):
if not layout:
# User specified a non-existent layout. default to one Terminal
err('layout %s not defined' % layout)
raise(KeyError)
self.new_window()
return
# Wind the flat objects into a hierarchy
hierarchy = {}