Arnaldo Carvalho de Melo
2015-04-29 14:30:29 UTC
We should 'import gtk', not 'import pygtk', fixes bugs when the error
paths try to use gtk.messageDialog():
[***@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
[***@ssdandy tuna]#
Signed-off-by: Arnaldo Carvalho de Melo <***@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
paths try to use gtk.messageDialog():
[***@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
[***@ssdandy tuna]#
Signed-off-by: Arnaldo Carvalho de Melo <***@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
1.8.3.1