1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 22:05:12 +00:00

fix: set repo of build-in update

This commit is contained in:
YoursFunny 2023-11-21 23:15:06 +08:00
parent ff3ec041d2
commit f8404edd9e
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C
2 changed files with 8 additions and 3 deletions

View File

@ -77,6 +77,12 @@ class DeployConfig(ConfigModel):
self.config_template = {}
self.read()
self.set_repo()
self.write()
self.show_config()
def set_repo(self):
# Bypass webui.config.DeployConfig.__setattr__()
# Don't write these into deploy.yaml
if self.Repository == 'cn':
@ -84,9 +90,6 @@ class DeployConfig(ConfigModel):
if self.Repository == 'global':
super().__setattr__('Repository', 'https://github.com/TheFunny/ArisuAutoSweeper')
self.write()
self.show_config()
def show_config(self):
logger.hr("Show deploy config", 1)
for k, v in self.config.items():

View File

@ -5,6 +5,7 @@ import time
from typing import Generator, List, Tuple
import requests
from deploy.Windows.config import ExecutionError
from deploy.Windows.git import GitManager
from deploy.Windows.pip import PipManager
@ -20,6 +21,7 @@ from module.webui.utils import TaskHandler, get_next_time
class Updater(DeployConfig, GitManager, PipManager):
def __init__(self, file=DEPLOY_CONFIG):
super().__init__(file=file)
self.set_repo()
self.state = 0
self.event: threading.Event = None