mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 02:27:21 +00:00
Fix broken log message in error_proof helper
This commit is contained in:
parent
81287ba533
commit
666fd687dd
@ -567,6 +567,7 @@ def _error_proof(*expected_errors):
|
||||
class error_proof(object):
|
||||
def __init__(self, *expected_exceptions):
|
||||
self._expected = expected_exceptions
|
||||
self.fn = None
|
||||
|
||||
@staticmethod
|
||||
def show_error(msg):
|
||||
@ -598,7 +599,8 @@ class error_proof(object):
|
||||
def __exit__(self, exc_type, exc_val, traceback):
|
||||
if exc_type:
|
||||
if exc_type in self._expected:
|
||||
LOG.error('%s: %s: %s' % (self.fn, exc_type, exc_val))
|
||||
LOG.error('%s: %s: %s',
|
||||
self.fn or 'context', exc_type, exc_val)
|
||||
self.show_error(exc_val)
|
||||
return True
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user