def initUI(self): ui_path = os.path.join('dependencies','ui', 'elixys_uploader.ui') uic.loadUi(ui_path, self) self.connect(hdlr, QtCore.SIGNAL("log_message(QString, QString)"), self.log_message) self.dialog_btn = self.findChild(QtGui.QPushButton,"upload_btn") self.dialog_btn.hide() self.dialog_btn.clicked.connect(self.install_elixys_version) self.cancel_install = self.findChild(QtGui.QPushButton,"no_btn") self.cancel_install.clicked.connect(self.abort_update) self.overwrite_copy = self.findChild(QtGui.QPushButton,"yes_btn") self.overwrite_copy.clicked.connect(self.overwrite_install) self.status_label = self.findChild(QtGui.QTextEdit, "status_txt") self.app_is_up = self.findChild(QtGui.QToolButton, "app_is_up") self.box_is_up = self.findChild(QtGui.QToolButton, "box_is_up") self.backup_btn = self.findChild(QtGui.QPushButton, "backup_btn") self.backup_btn.hide() self.backup_btn.clicked.connect(self.make_backup) self.app_is_up.hitButton = self.restart_server self.box_is_up.hitButton = self.reconnect self.show_buttons(False) self.monitor_is_up = MonitorAppIsUp() self.monitor_is_up.start() self.updater = updater.get_updater() self.connect(self.monitor_is_up, QtCore.SIGNAL("pyelixys_is_up(bool)"), self.pyelixys_is_up) self.settings = ElixysSettings() self.settings.setModal(True) self.authenticate() self.action_connection = self.findChild(QtGui.QAction, "actionConnections") self.action_connection.triggered.connect(self.open_settings)
def build(self, env=None, force=False, no_filters=False): """Build this bundle, meaning create the file given by the ``output`` attribute, applying the configured filters etc. A ``FileHunk`` will be returned. TODO: Support locking. When called from inside a template tag, this should lock, so that multiple requests don't all start to build. When called from the command line, there is no need to lock. """ if not self.output: raise BuildError('No output target found for %s' % self) env = self._get_env(env) # Determine if we really need to build, or if the output file # already exists and nothing has changed. if force: update_needed = True elif not path.exists(env.abspath(self.output)): if not env.updater: raise BuildError(('\'%s\' needs to be created, but ' 'automatic building is disabled (' 'configure an updater)') % self) else: update_needed = True else: source_paths = [p for p in self.get_files(env)] update_needed = get_updater(env.updater)( env.abspath(self.output), source_paths) if not update_needed: # We can simply return the existing output file return FileHunk(env.abspath(self.output)) hunk = self._build(env, self.output, force, no_filters) hunk.save(env.abspath(self.output)) return hunk
def get_updater(self): updater = get_updater(self.config["updater"]) if updater != self.config["updater"]: self.config["updater"] = updater return updater
def get_updater(self): updater = get_updater(self.config['updater']) if updater != self.config['updater']: self.config['updater'] = updater return updater
def get_updater(self): value = self.config['updater'] updater = get_updater(self.config['updater']) if updater != self.config['updater']: self.config['updater'] = updater return updater