[kupfer: 18/24] plugin.top: remove finished task from list
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 18/24] plugin.top: remove finished task from list
- Date: Fri, 27 Nov 2009 13:40:02 +0000 (UTC)
commit 02c2017e5e493fe25dd47354d81315e78876a0a6
Author: Karol BÄ?dkowski <karol bedkowsk+gh gmail com>
Date: Tue Nov 24 13:43:07 2009 +0100
plugin.top: remove finished task from list
Skip tasks with missing entry in /proc.
kupfer/plugin/top.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/plugin/top.py b/kupfer/plugin/top.py
index b1c4f69..7dc44eb 100644
--- a/kupfer/plugin/top.py
+++ b/kupfer/plugin/top.py
@@ -13,7 +13,7 @@ from kupfer import plugin_support
__kupfer_name__ = _("Top")
__kupfer_sources__ = ("TaskSource", )
__description__ = _("Show running tasks and allow sending signals to them")
-__version__ = "2009-11-22"
+__version__ = "2009-11-24"
__author__ = "Karol BÄ?dkowski <karol bedkowski gmail com>"
__kupfer_settings__ = plugin_support.PluginSettings(
{
@@ -149,9 +149,9 @@ def get_processes():
# read command line
proc_file = '/proc/%s/cmdline' % pid
- if os.path.isfile(proc_file):
+ if os.path.isfile(proc_file): # also skip (finished) missing tasks
with open(proc_file, 'rt') as f:
- cmd = str(f.readline().replace('\x00', ' ') or cmd)
+ cmd = f.readline().replace('\x00', ' ') or cmd
- yield (int(pid), float(cpu), float(mem), ptime, cmd)
+ yield (int(pid), float(cpu), float(mem), ptime, cmd)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]