Esempio n. 1
0
    def on_timeout(self):
        self.pulse()
        if not self.downgrade_done:
            line, returncode = proxy.get_cmd_pipe()
            if line != '':
                log.debug("Clean PPA result is: %s, returncode is: %s" % (line, returncode))
                line = line.rstrip()

                if '.deb' in line:
                    try:
                        package = line.split('.../')[1].split('_')[0]
                        self.set_progress_text(_('Downgrading...%s') % package)
                    except Exception, e:
                        log.error(e)
                else:
                    package = self.search_for_download_package(line)

                    if package:
                        self.set_progress_text(_('Downloading...%s') % package)

                if line:
                    self.terminal.insert(line)
                else:
                    self.terminal.insert('\n')

            # TODO if returncode isn't 0?
            if returncode.isdigit() and int(returncode) > 1:
                self.error = line
            elif returncode != 'None':
                log.debug("downgrade_done, returncode is: %s" % returncode)
                self.downgrade_done = True
Esempio n. 2
0
    def on_timeout(self):
        self.pulse()
        if not self.downgrade_done:
            line, returncode = proxy.get_cmd_pipe()
            log.debug("Clean PPA result is: %s, returncode is: %s" %
                      (line, returncode))
            if line != '':
                line = line.rstrip()
                if '.deb' in line:
                    try:
                        package = line.split('.../')[1].split('_')[0]
                        self.set_progress_text(_('Downgrading...%s') % package)
                    except:
                        pass
                if line:
                    self.terminal.insert(line)
                else:
                    self.terminal.insert('\n')

            # TODO if returncode isn't 0?
            if returncode != 'None':
                self.downgrade_done = True

        if not self.removekey_done:
            return True
        else:
            self.destroy()
Esempio n. 3
0
    def on_timeout(self):
        self.pulse()
        if not self.downgrade_done:
            line, returncode = proxy.get_cmd_pipe()
            log.debug("Clean PPA result is: %s, returncode is: %s" % (line, returncode))
            if line != '':
                line = line.rstrip()
                if '.deb' in line:
                    try:
                        package = line.split('.../')[1].split('_')[0]
                        self.set_progress_text(_('Downgrading...%s') % package)
                    except:
                        pass
                if line:
                    self.terminal.insert(line)
                else:
                    self.terminal.insert('\n')

            # TODO if returncode isn't 0?
            if returncode != 'None':
                self.downgrade_done = True

        if not self.removekey_done:
            return True
        else:
            self.destroy()
Esempio n. 4
0
    def on_timeout(self):
        self.pulse()

        line, returncode = proxy.get_cmd_pipe()
        log.debug("Clean config result is: %s" % line)
        if line != '':
            line = line.rstrip()
            if line:
                self.set_progress_text(line)
                self.terminal.insert(line)
            else:
                self.terminal.insert('\n')

        if returncode != 'None':
            self.done = True
            if returncode != '0':
                self.error = False

        if not self.done:
            return True
        else:
            self.destroy()
Esempio n. 5
0
    def on_timeout(self):
        self.pulse()

        line, returncode = proxy.get_cmd_pipe()
        log.debug("Clean config result is: %s" % line)
        if line != '':
            line = line.rstrip()
            if line:
                self.set_progress_text(line)
                self.terminal.insert(line)
            else:
                self.terminal.insert('\n')

        if returncode != 'None':
            self.done = True
            if returncode != '0':
                self.error = False

        if not self.done:
            return True
        else:
            self.destroy()