# Buggy code
def _FormatStatusTableRow(
    self,
    identifier,
    pid,
    status,
    process_status,
    number_of_events,
    number_of_events_delta,
    display_name,
):
    """Formats a status table row.

    Args:
      identifier: identifier to describe the status table entry.
      pid: the process identifier (PID).
      status: the process status string.
      process_status: string containing the process status.
      number_of_events: the total number of events.
      number_of_events_delta: the number of events since the last status update.
      display_name: the display name of the file last processed.
    """
    if number_of_events_delta == 0 and status == definitions.PROCESSING_STATUS_RUNNING:
        status = process_status

    # This check makes sure the columns are tab aligned.
    if len(status) < 8:
        status = "{0:s}\t".format(status)

    if number_of_events is None or number_of_events_delta is None:
        events = ""
    else:
        events = "{0:d} ({1:d})".format(number_of_events, number_of_events_delta)

        # This check makes sure the columns are tab aligned.
        if len(events) < 8:
            events = "{0:s}\t".format(events)

    # TODO: shorten display name to fit in 80 chars and show the filename.
    return "{0:s}\t{1:d}\t{2:s}\t{3:s}\t{4:s}".format(
        identifier, pid, status, events, display_name
    )


# Traceback (CError)
plaso-1.3.1.post20151021

^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 325, in _exit_function
p.join()
File "/usr/lib/python2.7/multiprocessing/process.py", line 145, in join
res = self._popen.wait(timeout)
File "/usr/lib/python2.7/multiprocessing/forking.py", line 154, in wait
return self.poll(0)
File "/usr/lib/python2.7/multiprocessing/forking.py", line 135, in poll
pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 325, in _exit_function
p.join()
File "/usr/lib/python2.7/multiprocessing/process.py", line 145, in join
res = self._popen.wait(timeout)
File "/usr/lib/python2.7/multiprocessing/forking.py", line 154, in wait
return self.poll(0)
File "/usr/lib/python2.7/multiprocessing/forking.py", line 135, in poll
pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored
Exception TypeError: "'NoneType' object is not callable" in <Finalize object, dead> ignored\


analyst   4035  3335  0 Oct29 pts/19   00:00:57 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4045  4035  0 Oct29 pts/19   00:01:02 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4048  4035  0 Oct29 pts/19   00:00:39 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4051  4035  0 Oct29 pts/19   00:00:58 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4054  4035  0 Oct29 pts/19   00:00:41 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4060  4035  0 Oct29 pts/19   00:00:44 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4063  4035  0 Oct29 pts/19   00:00:40 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4066  4035  0 Oct29 pts/19   00:00:37 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4068  4035  0 Oct29 pts/19   00:00:40 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4070  4035  0 Oct29 pts/19   00:11:09 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4073  4035  0 Oct29 pts/19   00:00:37 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4076  4035  0 Oct29 pts/19   00:00:37 /usr/bin/python /usr/local/bin/log2timeline.py -p --vss-stores 1 srt.dump /media/usb1
analyst   4083  4035  1 Oct29 pts/19   00:14:40 [log2timeline.py] <defunct>

# Fixed code
def _FormatStatusTableRow(
    self,
    identifier,
    pid,
    status,
    process_status,
    number_of_events,
    number_of_events_delta,
    display_name,
):
    """Formats a status table row.

    Args:
      identifier: identifier to describe the status table entry.
      pid: the process identifier (PID).
      status: the process status string.
      process_status: string containing the process status.
      number_of_events: the total number of events.
      number_of_events_delta: the number of events since the last status update.
      display_name: the display name of the file last processed.
    """
    if number_of_events_delta == 0 and status in [
        definitions.PROCESSING_STATUS_RUNNING,
        definitions.PROCESSING_STATUS_HASHING,
        definitions.PROCESSING_STATUS_PARSING,
    ]:
        status = process_status

    # This check makes sure the columns are tab aligned.
    if len(status) < 8:
        status = "{0:s}\t".format(status)

    if number_of_events is None or number_of_events_delta is None:
        events = ""
    else:
        events = "{0:d} ({1:d})".format(number_of_events, number_of_events_delta)

        # This check makes sure the columns are tab aligned.
        if len(events) < 8:
            events = "{0:s}\t".format(events)

    # TODO: shorten display name to fit in 80 chars and show the filename.
    return "{0:s}\t{1:d}\t{2:s}\t{3:s}\t{4:s}".format(
        identifier, pid, status, events, display_name
    )