Fix crash when running under python3.
This reverts
cd6ffb5913664844290f44a7ea48533caf8c459e
Traceback (most recent call last):
File "./iotop.py", line 12, in <module>
main()
File "./iotop/iotop/ui.py", line 597, in main
main_loop()
File "./iotop/iotop/ui.py", line 587, in <lambda>
main_loop = lambda: run_iotop(options)
File "./iotop/iotop/ui.py", line 485, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib/python3.2/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "./iotop/iotop/ui.py", line 478, in run_iotop_window
ui.run()
File "./iotop/iotop/ui.py", line 153, in run
total = self.process_list.refresh_processes()
File "./iotop/iotop/data.py", line 459, in refresh_processes
self.processes.items() if
File "./iotop/iotop/data.py", line 460, in <listcomp>
process.update_stats()])
File "./iotop/iotop/data.py", line 358, in update_stats
for tid, thread in self.threads.items():
RuntimeError: dictionary changed size during iteration
[This is valid since
0fc4ab84c8cbba1fbe83dc71fb89100b87c54898
added the self.threads = dict(...)]