Esempio n. 1
0
    def exec_command(self, command):
        try:
            # Run the command in a separate thread
            print(("Run command: {}".format(command)))
            name = 'aptcmd'
            t = ExecuteThreadedCommands([command], self.queue)
            self.threads[name] = t
            t.daemon = True
            t.start()
            self.queue.join()
            GObject.timeout_add(250, self.check_thread, name)

        except Exception as detail:
            ErrorDialog(self.btnInstall.get_label(), detail)
Esempio n. 2
0
    def exec_command(self, command):
        try:
            # Run the command in a separate thread
            self.set_buttons_state(False)
            name = 'cmd'
            t = ExecuteThreadedCommands([command], self.queue)
            self.threads[name] = t
            t.daemon = True
            t.start()
            self.queue.join()
            GObject.timeout_add(1000, self.check_thread, name)

        except Exception as detail:
            ErrorDialog(self.btnExecute.get_label(), detail)
Esempio n. 3
0
    def exec_command(self, command):
        try:
            # Run the command in a separate thread
            self.set_buttons_state(False)
            name = 'cmd'
            t = ExecuteThreadedCommands([command], self.queue)
            self.threads[name] = t
            t.daemon = True
            t.start()
            self.queue.join()
            GObject.timeout_add(1000, self.check_thread, name)

        except Exception as detail:
            ErrorDialog(self.btnExecute.get_label(), detail)
Esempio n. 4
0
    def exec_command(self, command):
        try:
            # Run the command in a separate thread
            print(("Run command: {}".format(command)))
            name = 'aptcmd'
            t = ExecuteThreadedCommands([command], self.queue)
            self.threads[name] = t
            t.daemon = True
            t.start()
            self.queue.join()
            GObject.timeout_add(250, self.check_thread, name)

        except Exception as detail:
            MessageDialogSafe(self.btnInstall.get_label(), detail,
                              Gtk.MessageType.ERROR, self.window).show()