[PATCH 1/1] tuna config: Fix pygtk import
by Arnaldo Carvalho de Melo
We should 'import gtk', not 'import pygtk', fixes bugs when the error
paths try to use gtk.messageDialog():
[root@ssdandy tuna]# tuna
Traceback (most recent call last):
File "/home/acme/git/tuna/tuna-cmd.py", line 654, in <module>
main()
File "/home/acme/git/tuna/tuna-cmd.py", line 648, in main
app = tuna_gui.main_gui(kthreads, uthreads, cpus_filtered)
File "/home/acme/git/tuna/tuna/tuna_gui.py", line 64, in __init__
self.profileview.init_default_file()
File "/home/acme/git/tuna/tuna/gui/profileview.py", line 141, in
init_default_file
not self.config.load(self.config.config['lastfile']):
File "/home/acme/git/tuna/tuna/config.py", line 48, in load
if(self.tuned2Tuna(profileName) < 0):
File "/home/acme/git/tuna/tuna/config.py", line 66, in tuned2Tuna
dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR,\
NameError: global name 'gtk' is not defined
[root@ssdandy tuna]#
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
---
tuna/config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tuna/config.py b/tuna/config.py
index 77cc4d800c03..7e19a28f967f 100644
--- a/tuna/config.py
+++ b/tuna/config.py
@@ -1,5 +1,5 @@
import io, os, re, fnmatch
-import sys, pygtk
+import sys, gtk
import codecs, ConfigParser
from time import localtime, strftime
from subprocess import Popen, PIPE, STDOUT, call
--
1.8.3.1
8 years, 7 months
Suggested extensions to python-inet_diag library
by James Hulka
In looking for faster way to retrieve information about open sockets on
a system I stumbled across python-inet_diag.
The library is very useful however it was missing the query / filter
code found in socketstat (Alexey Kuznetsov) which it seems to be based on.
I would like to propose the following patches to implement source and
destination IP and port filters for the inet_diag.create function.
Best Regards,
James Hulka
socketstat_filter.patch :
inet_diag.c: added filter building code from socketstat (Alexey
Kuznetsov, <kuznet(a)ms2.inr.ac.ru>)
added filter options to create function
added create function documentation
diag_filter.h: new header file
added various filter condition constants
added diag_filter structure
process_info.patch :
inet_diag.c: added process info parsing from socketstat (Alexey
Kuznetsov, <kuznet(a)ms2.inr.ac.ru>)
req_v2.patch :
inet_diag.c: using req_v2 and specifying protocol type in header
retreiving full process path
return proc as struct
leak_fixes.patch :
inet_diag.c: cleanup memory leaks and reformat
memory cleanup user_ent_hash
inet_diag_copy.h: unused removed
listening_states.patch :
inet_diag.c: added listening states constant
added process, pid and fd getter functions
cleanup memory leaks and reformat
memory cleanup user_ent_hash
8 years, 7 months