diff options
author | Philipp Hagemeister <[email protected]> | 2011-09-15 20:09:30 +0200 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2011-09-15 20:09:30 +0200 |
commit | 2736595628392257a43a226c34bfce4fd7858ce8 (patch) | |
tree | d8b2c60682db87afa59f15078c893e43019d8ee3 | |
parent | 7b1a2bbe178d0eb35f92242223558ba9ccef581b (diff) | |
download | youtube-dl-2736595628392257a43a226c34bfce4fd7858ce8.tar.gz youtube-dl-2736595628392257a43a226c34bfce4fd7858ce8.zip |
Do not update if already up-to-date (Closes #166)
-rwxr-xr-x | youtube-dl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube-dl b/youtube-dl index fa1e482ba..34e86e027 100755 --- 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: |