# Buggy code
def _PrintStatusUpdate(self, processing_status):
    """Prints the processing status.

    Args:
      processing_status (ProcessingStatus): processing status.
    """
    if self._stdout_output_writer:
        self._ClearScreen()

    self._output_writer.Write(
        "plaso - {0:s} version {1:s}\n".format(self.NAME, plaso.GetVersion())
    )
    self._output_writer.Write("\n")

    self._PrintStatusHeader()

    # TODO: for win32console get current color and set intensity,
    # write the header separately then reset intensity.
    status_header = "Identifier\t\tPID\tStatus\t\tEvents\t\tReports"
    if not win32console:
        status_header = "\x1b[1m{0:s}\x1b[0m".format(status_header)

    status_table = [status_header]

    status_row = self._FormatStatusTableRow(processing_status.foreman_status)
    status_table.append(status_row)

    for worker_status in processing_status.workers_status:
        status_row = self._FormatStatusTableRow(worker_status)
        status_table.append(status_row)

    status_table.append("")
    self._output_writer.Write("\n".join(status_table))
    self._output_writer.Write("\n")

    if processing_status.aborted:
        self._output_writer.Write("Processing aborted - waiting for clean up.\n\n")

    # TODO: remove update flicker. For win32console we could set the cursor
    # top left, write the table, clean the remainder of the screen buffer
    # and set the cursor at the end of the table.
    if self._stdout_output_writer:
        # We need to explicitly flush stdout to prevent partial status updates.
        sys.stdout.flush()


# Traceback (KeyError)
[ERROR] (nsrlsvr   ) PID:XXXXX <analysis_process> <dfvfs.path.os_path_spec.OSPathSpec object at 0xXXXXXXXXXXXX>
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/plaso/multi_processing/analysis_process.py", line 138, in _Main
self._analysis_mediator.ProduceAnalysisReport(self._analysis_plugin)
File "/usr/lib/python2.7/dist-packages/plaso/analysis/mediator.py", line 95, in ProduceAnalysisReport
analysis_report = plugin.CompileReport(self)
File "/usr/lib/python2.7/dist-packages/plaso/analysis/interface.py", line 280, in CompileReport
hash_analysis)
File "/usr/lib/python2.7/dist-packages/plaso/analysis/interface.py", line 187, in _HandleHashAnalysis
event_uuids = self._event_uuids_by_pathspec.pop(pathspec)
KeyError: <dfvfs.path.os_path_spec.OSPathSpec object at 0xXXXXXXXXXXXX>

# Fixed code
def _PrintStatusUpdate(self, processing_status):
    """Prints the processing status.

    Args:
      processing_status (ProcessingStatus): processing status.
    """
    if self._stdout_output_writer:
        self._ClearScreen()

    self._output_writer.Write(
        "plaso - {0:s} version {1:s}\n".format(self.NAME, plaso.GetVersion())
    )
    self._output_writer.Write("\n")

    self._PrintStatusHeader()

    # TODO: for win32console get current color and set intensity,
    # write the header separately then reset intensity.
    status_header = "Identifier\t\tPID\tStatus\t\tEvents\t\tTags\t\tReports"
    if not win32console:
        status_header = "\x1b[1m{0:s}\x1b[0m".format(status_header)

    status_table = [status_header]

    status_row = self._FormatStatusTableRow(processing_status.foreman_status)
    status_table.append(status_row)

    for worker_status in processing_status.workers_status:
        status_row = self._FormatStatusTableRow(worker_status)
        status_table.append(status_row)

    status_table.append("")
    self._output_writer.Write("\n".join(status_table))
    self._output_writer.Write("\n")

    if processing_status.aborted:
        self._output_writer.Write("Processing aborted - waiting for clean up.\n\n")

    # TODO: remove update flicker. For win32console we could set the cursor
    # top left, write the table, clean the remainder of the screen buffer
    # and set the cursor at the end of the table.
    if self._stdout_output_writer:
        # We need to explicitly flush stdout to prevent partial status updates.
        sys.stdout.flush()