Make .shutdown work if renderer was not created

Fixes #486
This commit is contained in:
ZyX 2013-05-11 13:13:31 +04:00
parent 962a1b6fc2
commit 5c2c47aa2f
1 changed files with 4 additions and 1 deletions

View File

@ -376,7 +376,10 @@ class Powerline(object):
current application. current application.
''' '''
self.shutdown_event.set() self.shutdown_event.set()
self.renderer.shutdown() try:
self.renderer.shutdown()
except AttributeError:
pass
functions = ( functions = (
self.on_main_change, self.on_main_change,
self.on_colors_change, self.on_colors_change,