| 1990 | os.remove(is_stop_syssafe_file) |
| 1991 | |
| 1992 | def task_table_rep(self): |
| 1993 | try: |
| 1994 | conn = sqlite3.connect(self.db_file) |
| 1995 | cur = conn.cursor() |
| 1996 | ret = cur.execute("SELECT count(*) FROM sqlite_master where type='table' and name='tasks' and sql like '%msg%'") |
| 1997 | if ret.fetchone()[0] == 0: |
| 1998 | cur.execute("ALTER TABLE tasks ADD COLUMN msg TEXT DEFAULT '安装成功'") |
| 1999 | ret2 = cur.execute("SELECT count(*) FROM sqlite_master where type='table' and name='tasks' and sql like '%install_status%'") |
| 2000 | if ret2.fetchone()[0] == 0: |
| 2001 | cur.execute("ALTER TABLE tasks ADD COLUMN install_status INTEGER DEFAULT 1") |
| 2002 | cur.close() |
| 2003 | conn.commit() |
| 2004 | conn.close() |
| 2005 | except: |
| 2006 | pass |
| 2007 | |
| 2008 | @staticmethod |
| 2009 | def save_installed_msg(task_data: dict): |