Use new URL scheme and define the kitty website centrally as much as possible

This commit is contained in:
Kovid Goyal
2021-07-27 09:03:11 +05:30
parent 17f3d2d581
commit 1bd39ff935
14 changed files with 42 additions and 29 deletions

View File

@@ -10,13 +10,13 @@ from typing import Dict, NamedTuple, Optional
from urllib.request import urlopen
from .config import atomic_save
from .constants import Version, cache_dir, kitty_exe, version
from .constants import Version, cache_dir, kitty_exe, version, website_url
from .fast_data_types import add_timer, get_boss, monitor_pid
from .notify import notify
from .utils import log_error, open_url
CHANGELOG_URL = 'https://sw.kovidgoyal.net/kitty/changelog.html'
RELEASED_VERSION_URL = 'https://sw.kovidgoyal.net/kitty/current-version.txt'
CHANGELOG_URL = website_url('changelog')
RELEASED_VERSION_URL = website_url() + 'current-version.txt'
CHECK_INTERVAL = 24 * 60 * 60.
@@ -104,8 +104,8 @@ def process_current_release(raw: str) -> None:
def run_worker() -> None:
import time
import random
import time
time.sleep(random.randint(1000, 4000) / 1000)
with suppress(BrokenPipeError): # happens if parent process is killed before us
print(get_released_version())