+ urlv = urllib2.urlopen(UPDATE_URL_VERSION)
+ newversion = urlv.read().strip()
+ if newversion == __version__:
+ downloader.to_screen(u'youtube-dl is up-to-date (' + __version__ + ')')
+ return
+ urlv.close()
+
+ if hasattr(sys, "frozen"): #py2exe
+ exe = os.path.abspath(filename)
+ directory = os.path.dirname(exe)
+ if not os.access(directory, os.W_OK):
+ sys.exit('ERROR: no write permissions on %s' % directory)
+