Fix crash caused by log message interpolation bug

When running with debug enabled, misnamed variable
in log message templates causes the whole app to
crash miserably. /o\

This patch makes vbmc immortal again.\o/

Change-Id: Ib863aea5699e16649a729f30d09ab4b1501d52ae
This commit is contained in:
Ilya Etingof 2018-08-01 13:07:17 +02:00
parent 9ebc73b63b
commit 4974df97d5
1 changed files with 4 additions and 2 deletions

View File

@ -77,7 +77,8 @@ def main_loop(vbmc_manager, handle_command):
)
continue
LOG.debug('Command request data: %(request)s', {'cmd': data_in})
LOG.debug('Command request data: %(request)s',
{'request': data_in})
try:
data_out = handle_command(vbmc_manager, data_in)
@ -90,7 +91,8 @@ def main_loop(vbmc_manager, handle_command):
'msg': [msg]
}
LOG.debug('Command response data: %(response)s', {'cmd': data_out})
LOG.debug('Command response data: %(response)s',
{'response': data_out})
try:
message = json.dumps(data_out)