From 4165c635b8cf37e9e996ba363aeb04537c49728f Mon Sep 17 00:00:00 2001 From: William Roberts Date: Tue, 13 Dec 2016 19:17:07 -0800 Subject: [PATCH] fsconfig: fix pylint warning Fix pylint warning: W:292,47: Cell variable lineno defined in loop (cell-var-from-loop) For the closure function that prints the error message, we actually want the value of modified lineno within the closure. Test: run unit tests Change-Id: I7d08184563d347c826ca1af7558fb8e378f151e1 Signed-off-by: William Roberts --- tools/fs_config/fs_config_generator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fs_config/fs_config_generator.py b/tools/fs_config/fs_config_generator.py index c76e8f4c8e..2cf2fd87e3 100755 --- a/tools/fs_config/fs_config_generator.py +++ b/tools/fs_config/fs_config_generator.py @@ -289,6 +289,7 @@ class AIDHeaderParser(object): def error_message(msg): """Creates an error message with the current parsing state.""" + # pylint: disable=cell-var-from-loop return 'Error "{}" in file: "{}" on line: {}'.format( msg, self._aid_header, str(lineno))