def refresh(self, reload=0): menu = self.menustack[-1] if not isinstance(menu, Menu): # Do not draw if there are any children if self.children: return False return menu.refresh() # We need to unmount devices but only at the top menu if len(self.menustack) == 1: if self.menustack[-1].umount_all == 1: util.umount_all() if reload: if menu.reload_func: reload = menu.reload_func() if reload: self.menustack[-1] = reload if self.force_page_rebuild: self.force_page_rebuild = False self.rebuild_page() self.init_page() skin.draw('menu', self, self.menustack[-1], self.screen_transition) self.screen_transition = skin.TRANSITION_NONE
def run_action(self, action): try: action.post_conf(self.state) action.run() except Exception: util.umount_all(self.state.mount_points) raise
def refresh(self, reload=0): menu = self.menustack[-1] if not isinstance(menu, Menu): # Do not draw if there are any children if self.children: return False return skin.draw(menu.type, menu) if self.menustack[-1].umount_all == 1: util.umount_all() if reload: if menu.reload_func: reload = menu.reload_func() if reload: self.menustack[-1] = reload if self.force_page_rebuild: self.force_page_rebuild = False self.rebuild_page() self.init_page() skin.draw('menu', self, self.menustack[-1])
def chroot_failure(self): util.umount_all(self.istate.mount_points)