From 4974df97d5ac9b52e5b5917f06afc39176999d41 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Wed, 1 Aug 2018 13:07:17 +0200 Subject: [PATCH] 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 --- virtualbmc/control.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/virtualbmc/control.py b/virtualbmc/control.py index 9fcda05..9a9cbb6 100644 --- a/virtualbmc/control.py +++ b/virtualbmc/control.py @@ -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)