mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
Do not update if already up-to-date (Closes #166)
This commit is contained in:
parent
7b1a2bbe17
commit
2736595628
1 changed files with 5 additions and 0 deletions
|
@ -3409,6 +3409,11 @@ def updateSelf(downloader, filename):
|
||||||
try:
|
try:
|
||||||
urlh = urllib.urlopen(UPDATE_URL)
|
urlh = urllib.urlopen(UPDATE_URL)
|
||||||
newcontent = urlh.read()
|
newcontent = urlh.read()
|
||||||
|
|
||||||
|
vmatch = re.search("__version__ = '([^']+)'", newcontent)
|
||||||
|
if vmatch is not None and vmatch.group(1) == __version__:
|
||||||
|
downloader.to_screen('youtube-dl is up-to-date (' + __version__ + ')')
|
||||||
|
return
|
||||||
finally:
|
finally:
|
||||||
urlh.close()
|
urlh.close()
|
||||||
except (IOError, OSError), err:
|
except (IOError, OSError), err:
|
||||||
|
|
Loading…
Reference in a new issue