projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b1a2bb
)
Do not update if already up-to-date (Closes #166)
author
Philipp Hagemeister
<phihag@phihag.de>
Thu, 15 Sep 2011 18:09:30 +0000
(20:09 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Thu, 15 Sep 2011 18:09:30 +0000
(20:09 +0200)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index fa1e482ba5fce60ba60197de1b0928ef608e4bfa..34e86e027979f84bc983aa8a71dbc5e71e994b52 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-3409,6
+3409,11
@@
def updateSelf(downloader, filename):
try:
urlh = urllib.urlopen(UPDATE_URL)
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:
urlh.close()
except (IOError, OSError), err: