From: Philipp Hagemeister Date: Thu, 15 Sep 2011 18:09:30 +0000 (+0200) Subject: Do not update if already up-to-date (Closes #166) X-Git-Url: https://git.jankratochvil.net/?p=youtube-dl.git;a=commitdiff_plain;h=2736595628392257a43a226c34bfce4fd7858ce8 Do not update if already up-to-date (Closes #166) --- diff --git a/youtube-dl b/youtube-dl index fa1e482..34e86e0 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: