reduce the dbus signal calls and correctly handle password timeout

This commit is contained in:
guinux
2013-03-29 15:49:47 +01:00
parent 831af0a5ca
commit ee592092ad
2 changed files with 49 additions and 20 deletions

View File

@@ -75,10 +75,10 @@ def target_signal_handler(target):
progress_bar.set_text(target)
def percent_signal_handler(percent):
if float(percent) > 1:
if percent > 1:
progress_bar.pulse()
else:
progress_bar.set_fraction(float(percent))
progress_bar.set_fraction(percent)
bus = dbus.SystemBus()
bus.add_signal_receiver(action_signal_handler, dbus_interface = "org.manjaro.pamac", signal_name = "EmitAction")
@@ -583,7 +583,10 @@ def finalize():
ProgressWindow.show_all()
while Gtk.events_pending():
Gtk.main_iteration()
transaction.Commit()#reply_handler = handle_reply, error_handler = handle_error, timeout = 2000*1000)
try:
transaction.Commit()#reply_handler = handle_reply, error_handler = handle_error, timeout = 2000*1000)
except dbus.exceptions.DBusException as e:
handle_error(str(e))
def check_conflicts(mode, pkg_list):
depends = [pkg_list]