diff options
Diffstat (limited to 'yt_dlp/__init__.py')
-rw-r--r-- | yt_dlp/__init__.py | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 991dbcda7..b4dc12fac 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -1,10 +1,7 @@ -try: - import contextvars # noqa: F401 -except Exception: - raise Exception( - f'You are using an unsupported version of Python. Only Python versions 3.7 and above are supported by yt-dlp') # noqa: F541 +#!/usr/bin/python +f'You are using an unsupported version of Python. Only Python versions 3.6 and above are supported by yt-dlp' # noqa: F541 -__license__ = 'Public Domain' +__license__ = 'CC0-1.0' import collections import getpass @@ -32,7 +29,6 @@ from .postprocessor import ( MetadataFromFieldPP, MetadataParserPP, ) -from .update import Updater from .utils import ( NO_DEFAULT, POSTPROCESS_WHEN, @@ -966,19 +962,6 @@ def _real_main(argv=None): if opts.rm_cachedir: ydl.cache.remove() - try: - updater = Updater(ydl, opts.update_self) - if opts.update_self and updater.update() and actual_use: - if updater.cmd: - return updater.restart() - # This code is reachable only for zip variant in py < 3.10 - # It makes sense to exit here, but the old behavior is to continue - ydl.report_warning('Restart yt-dlp to use the updated version') - # return 100, 'ERROR: The program must exit for the update to complete' - except Exception: - traceback.print_exc() - ydl._download_retcode = 100 - if not actual_use: if pre_process: return ydl._download_retcode |