autoupdater: Move upstream.rstrip('/') to rest_api classes
This commit is contained in:
parent
8495456aac
commit
e93bf7f0ff
2 changed files with 2 additions and 2 deletions
|
@ -461,7 +461,7 @@ class AppAutoUpdater:
|
|||
self, strategy: str, asset: Union[str, dict], infos: dict[str, Any]
|
||||
) -> Optional[tuple[str, Union[str, dict[str, str]], str]]:
|
||||
autoupdate = infos.get("autoupdate")
|
||||
upstream = autoupdate.get("upstream", self.main_upstream).strip("/")
|
||||
upstream = autoupdate.get("upstream", self.main_upstream)
|
||||
version_re = autoupdate.get("version_regex", None)
|
||||
allow_prereleases = autoupdate.get("allow_prereleases", False)
|
||||
_, remote_type, revision_type = strategy.split("_")
|
||||
|
|
|
@ -15,7 +15,7 @@ class RefType(Enum):
|
|||
|
||||
class GithubAPI:
|
||||
def __init__(self, upstream: str, auth: Optional[tuple[str, str]] = None):
|
||||
self.upstream = upstream
|
||||
self.upstream = upstream.strip("/")
|
||||
self.upstream_repo = upstream.replace("https://github.com/", "").strip("/")
|
||||
assert (
|
||||
len(self.upstream_repo.split("/")) == 2
|
||||
|
|
Loading…
Reference in a new issue