tko parser: fix variable scoping

The variable ignored_lines was set to the empty list
in print_and_reset_ignored_lines().  This made the python
parser treat it as local to the function instead of using
the variable defined in the outer scope.  Removing the
assignment is probably the best solution in this case.

BUG=chromium:693610
TEST=none

Change-Id: I5a388855b2d808075e7e265fd1dababa4f082aec
Reviewed-on: https://chromium-review.googlesource.com/444100
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py
index e01cfcc..aa1bb2d 100644
--- a/tko/parsers/version_1.py
+++ b/tko/parsers/version_1.py
@@ -306,12 +306,11 @@
         ignored_lines = []
         yield []   # We're ready to start running.
 
-        def print_and_reset_ignored_lines():
+        def print_ignored_lines():
             tko_utils.dprint('The following lines were ignored:')
             for line in ignored_lines:
                 tko_utils.dprint(line)
             tko_utils.dprint('---------------------------------')
-            ignored_lines = []
 
         # Create a RUNNING SERVER_JOB entry to represent the entire test.
         running_job = test.parse_partial_test(self.job, '----', 'SERVER_JOB',
@@ -323,7 +322,8 @@
             # Are we finished with parsing?
             if buffer.size() == 0 and self.finished:
                 if ignored_lines:
-                    print_and_reset_ignored_lines()
+                    print_ignored_lines()
+                    ignored_lines = []
                 if stack.size() == 0:
                     break
                 # We have status lines left on the stack;
@@ -364,7 +364,8 @@
                 ignored_lines.append(raw_line)
                 continue
             elif ignored_lines:
-                print_and_reset_ignored_lines()
+                print_ignored_lines()
+                ignored_lines = []
 
             # Do an initial sanity check of the indentation.
             expected_indent = stack.size()