Fix package uninstall script
This commit is contained in:
parent
fe82f0f305
commit
fdb62cd2b4
@ -3,7 +3,7 @@
|
|||||||
import gi
|
import gi
|
||||||
gi.require_version("Gtk", "2.0")
|
gi.require_version("Gtk", "2.0")
|
||||||
|
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk, GObject
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sys
|
import sys
|
||||||
@ -20,7 +20,7 @@ except Exception, detail:
|
|||||||
|
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
Gdk.threads_init()
|
GObject.threads_init()
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
gettext.install("mintmenu", "/usr/share/linuxmint/locale")
|
gettext.install("mintmenu", "/usr/share/linuxmint/locale")
|
||||||
@ -31,12 +31,6 @@ class RemoveExecuter(threading.Thread):
|
|||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.window_id = window_id
|
self.window_id = window_id
|
||||||
self.package = package
|
self.package = package
|
||||||
|
|
||||||
def execute(self, command):
|
|
||||||
#print "Executing: " + command
|
|
||||||
os.system(command)
|
|
||||||
ret = commands.getoutput("echo $?")
|
|
||||||
return ret
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
removePackages = string.split(self.package)
|
removePackages = string.split(self.package)
|
||||||
@ -57,7 +51,7 @@ class RemoveExecuter(threading.Thread):
|
|||||||
f.close()
|
f.close()
|
||||||
Gtk.main_quit()
|
Gtk.main_quit()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
class mintRemoveWindow:
|
class mintRemoveWindow:
|
||||||
|
|
||||||
def __init__(self, desktopFile):
|
def __init__(self, desktopFile):
|
||||||
|
Loading…
Reference in New Issue
Block a user