projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement a different adult sites checking algorithm
[youtube-dl]
/
youtube_dl
/
update.py
diff --git
a/youtube_dl/update.py
b/youtube_dl/update.py
index e5f441707c10b76f1f84c07454a71d6aa4cd030d..cd9670166e582ae9f3074c2371026f0f06c252a1 100644
(file)
--- a/
youtube_dl/update.py
+++ b/
youtube_dl/update.py
@@
-41,6
+41,7
@@
def rsa_verify(message, signature, key):
if signature != sha256(message).digest(): return False
return True
if signature != sha256(message).digest(): return False
return True
+
def update_self(to_screen, verbose):
"""Update the program file with the latest version from the repository"""
def update_self(to_screen, verbose):
"""Update the program file with the latest version from the repository"""
@@
-82,6
+83,13
@@
def update_self(to_screen, verbose):
return
version_id = versions_info['latest']
return
version_id = versions_info['latest']
+
+ def version_tuple(version_str):
+ return tuple(map(int, version_str.split('.')))
+ if version_tuple(__version__) >= version_tuple(version_id):
+ to_screen(u'youtube-dl is up to date (%s)' % __version__)
+ return
+
to_screen(u'Updating to version ' + version_id + '...')
version = versions_info['versions'][version_id]
to_screen(u'Updating to version ' + version_id + '...')
version = versions_info['versions'][version_id]