mirror of
https://github.com/powerline/powerline.git
synced 2025-07-29 00:34:49 +02:00
Fix Powerline.exception
This commit is contained in:
parent
1977a0125c
commit
d882d312fc
@ -462,8 +462,10 @@ class Powerline(object):
|
|||||||
def __exit__(self, *args):
|
def __exit__(self, *args):
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
|
|
||||||
def exception(self, msg, prefix='powerline', *args, **kwargs):
|
def exception(self, msg, *args, **kwargs):
|
||||||
|
if 'prefix' not in kwargs:
|
||||||
|
kwargs['prefix'] = 'powerline'
|
||||||
if self.pl:
|
if self.pl:
|
||||||
return self.pl.exception(msg, prefix=prefix, *args, **kwargs)
|
return self.pl.exception(msg, *args, **kwargs)
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user