diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-11-23 22:13:03 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-11-23 22:13:03 +0100 |
commit | 380b8220038d69c701cbaba04d1b049628d237b4 (patch) | |
tree | c35bc38e1b221bdb10caba95b25133ab90ab11b9 /devscripts/transition_helper.py | |
parent | b66e699877937b4520db885c82958714304bf74a (diff) |
Remove outdated transition helper scripts
Diffstat (limited to 'devscripts/transition_helper.py')
-rw-r--r-- | devscripts/transition_helper.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/devscripts/transition_helper.py b/devscripts/transition_helper.py deleted file mode 100644 index cfd21919b..000000000 --- a/devscripts/transition_helper.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python - -import sys, os - -try: - import urllib.request as compat_urllib_request -except ImportError: # Python 2 - import urllib2 as compat_urllib_request - -sys.stderr.write(u'Hi! We changed distribution method and now youtube-dl needs to update itself one more time.\n') -sys.stderr.write(u'This will only happen once. Simply press enter to go on. Sorry for the trouble!\n') -sys.stderr.write(u'The new location of the binaries is https://github.com/rg3/youtube-dl/downloads, not the git repository.\n\n') - -try: - raw_input() -except NameError: # Python 3 - input() - -filename = sys.argv[0] - -API_URL = "https://api.github.com/repos/rg3/youtube-dl/downloads" -BIN_URL = "https://github.com/downloads/rg3/youtube-dl/youtube-dl" - -if not os.access(filename, os.W_OK): - sys.exit('ERROR: no write permissions on %s' % filename) - -try: - urlh = compat_urllib_request.urlopen(BIN_URL) - newcontent = urlh.read() - urlh.close() -except (IOError, OSError) as err: - sys.exit('ERROR: unable to download latest version') - -try: - with open(filename, 'wb') as outf: - outf.write(newcontent) -except (IOError, OSError) as err: - sys.exit('ERROR: unable to overwrite current version') - -sys.stderr.write(u'Done! Now you can run youtube-dl.\n') |