If a new pinfo() is successfully created but we cannot get its taskstats, it
commitf13f64b771b765017cc87f14933ca94a1a23d437
authorGuillaume Chazarain <guichaz@gmail.com>
Mon, 29 Dec 2008 15:51:10 +0000 (29 16:51 +0100)
committerGuillaume Chazarain <guichaz@gmail.com>
Mon, 29 Dec 2008 15:51:10 +0000 (29 16:51 +0100)
treeace5d1167d2adc4a007f1791e2d8160d12dc7b87
parent322ba0c1985b22723a16195e6e471edf6dbcfce1
If a new pinfo() is successfully created but we cannot get its taskstats, it
will not have a .ioprio field, so it must be garbage collected. So, initialize
.mark to False so that incompletely built objects are garbage collected.

Traceback (most recent call last):
  File "./iotop.py", line 11, in <module>
    main()
  File "/home/g/iotop/iotop/ui.py", line 271, in main
    curses.wrapper(run_iotop, options)
  File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/g/iotop/iotop/ui.py", line 226, in run_iotop
    ui.run()
  File "/home/g/iotop/iotop/ui.py", line 97, in run
    self.process_list.duration)
  File "/home/g/iotop/iotop/ui.py", line 195, in refresh_display
    lines = self.get_data()
  File "/home/g/iotop/iotop/ui.py", line 183, in get_data
    return map(format, processes)
  File "/home/g/iotop/iotop/ui.py", line 167, in format
    line = '%5d %4s %-8s %11s %11s %7s %7s ' % (p.pid, p.ioprio,
AttributeError: 'pinfo' object has no attribute 'ioprio'
iotop/data.py