def clean_cruft(self, cruft_list=[], parent=None):
        for index, cruft in enumerate(cruft_list):
            log.debug('Cleaning...%s' % cruft.get_name())
            proxy.clean_configs(cruft.get_name())
            line, returncode = proxy.get_cmd_pipe()
            while returncode == 'None':
                log.debug('output: %s, returncode: %s' % (line, returncode))
                time.sleep(0.2)
                line, returncode = proxy.get_cmd_pipe()

            if returncode != '0':
                self.emit('clean_error', returncode)
                break
            else:
                self.emit('object_cleaned', cruft, index + 1)

        self.emit('all_cleaned', True)
    def clean_cruft(self, cruft_list=[], parent=None):
        for index, cruft in enumerate(cruft_list):
            log.debug('Cleaning...%s' % cruft.get_name())
            proxy.clean_configs(cruft.get_name())
            line, returncode = proxy.get_cmd_pipe()
            while returncode == 'None':
                log.debug('output: %s, returncode: %s' % (line, returncode))
                time.sleep(0.2)
                line, returncode = proxy.get_cmd_pipe()

            if returncode != '0':
                self.emit('clean_error', returncode)
                break
            else:
                self.emit('object_cleaned', cruft, index + 1)

        self.emit('all_cleaned', True)
 def run(self):
     proxy.clean_configs(self.pkgs)
     GObject.timeout_add(100, self.on_timeout)
     return super(CleanConfigDialog, self).run()