Skip to content

Commit

Permalink
Change to using main server download URL for the linux installer
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 9, 2016
1 parent 7f7a08f commit e71c1a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup/linux-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from contextlib import closing

is64bit = platform.architecture()[0] == '64bit'
url = 'http://code.calibre-ebook.com/dist/linux'+('64' if is64bit else '32')
url = os.environ.get('CALIBRE_INSTALLER_LOCAL_URL', url)
DLURL = 'https://calibre-ebook.com/dist/linux'+('64' if is64bit else '32')
DLURL = os.environ.get('CALIBRE_INSTALLER_LOCAL_URL', DLURL)
py3 = sys.version_info[0] > 2
enc = getattr(sys.stdout, 'encoding', 'utf-8') or 'utf-8'
if enc.lower() == 'ascii':
Expand Down Expand Up @@ -273,7 +273,7 @@ def do_download(dest):
offset = os.path.getsize(dest)

# Get content length and check if range is supported
rq = urllib.urlopen(url)
rq = urllib.urlopen(DLURL)
headers = rq.info()
size = int(headers['content-length'])
accepts_ranges = headers.get('accept-ranges', None) == 'bytes'
Expand Down

0 comments on commit e71c1a4

Please sign in to comment.