mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-01 07:05:14 +00:00
[cleanup] Refactor updater
The updater now uses `.update.run_update` and not `.update.update_self`. Although I don't expect anyone to be using the updater via API, a wrapper `update_self` is provided for compatibility just in case
This commit is contained in:
@@ -37,7 +37,7 @@ from .utils import (
|
||||
std_headers,
|
||||
write_string,
|
||||
)
|
||||
from .update import update_self
|
||||
from .update import run_update
|
||||
from .downloader import (
|
||||
FileDownloader,
|
||||
)
|
||||
@@ -663,7 +663,7 @@ def _real_main(argv=None):
|
||||
# Update version
|
||||
if opts.update_self:
|
||||
# If updater returns True, exit. Required for windows
|
||||
if update_self(ydl.to_screen, opts.verbose, ydl._opener):
|
||||
if run_update(ydl):
|
||||
if actual_use:
|
||||
sys.exit('ERROR: The program must exit for the update to complete')
|
||||
sys.exit()
|
||||
|
||||
Reference in New Issue
Block a user