Przeglądaj źródła

처음에 버전 선택하도록

잉여개발기 (SPDV) 2 lat temu
rodzic
commit
f21d95be6d
1 zmienionych plików z 11 dodań i 1 usunięć
  1. 11 1
      route/tool/func.py

+ 11 - 1
route/tool/func.py

@@ -678,7 +678,17 @@ def set_init_always(conn, ver_num):
 
         curs.execute(db_change('select data from other where name = "update"'))
         up_data = curs.fetchall()
-        up_data = up_data[0][0] if up_data else 'stable'
+        if up_data:
+            up_data = up_data[0][0]
+        else:
+            print('Select branch (beta) [stable, beta, dev] : ', end = '')
+            up_data = input()
+            
+            if not up_data in ['stable', 'beta', 'dev', 'dont_use']:
+                up_data = 'beta'
+
+            curs.execute(db_change('delete from other where name = "update"'))
+            curs.execute(db_change('insert into other (name, data, coverage) values ("update", ?, "")'), [up_data])
 
         exe_type = ''
         if platform.system() == 'Linux':