Dont upload to files.calibre-ebook.com as it no longer exists

This commit is contained in:
Kovid Goyal 2016-01-12 10:24:31 +05:30
parent 39ebb0adab
commit 0c57ad189e

View File

@ -312,31 +312,31 @@ def upload_to_servers(files, version): # {{{
finally: finally:
os.chdir(cwd) os.chdir(cwd)
for server, rdir in {'files':'/srv/download/'}.iteritems(): # for server, rdir in {'files':'/srv/download/'}.iteritems():
print('Uploading to server:', server) # print('Uploading to server:', server)
server = '%s.calibre-ebook.com' % server # server = '%s.calibre-ebook.com' % server
# Copy the generated index files # # Copy the generated index files
print ('Copying generated index') # print ('Copying generated index')
check_call(['rsync', '-hza', '-e', 'ssh -x', '--include', '*.html', # check_call(['rsync', '-hza', '-e', 'ssh -x', '--include', '*.html',
'--filter', '-! */', base, 'root@%s:%s' % (server, rdir)]) # '--filter', '-! */', base, 'root@%s:%s' % (server, rdir)])
# Copy the release files # # Copy the release files
rdir = '%s%s/' % (rdir, version) # rdir = '%s%s/' % (rdir, version)
for x in files: # for x in files:
start = time.time() # start = time.time()
print ('Uploading', x) # print ('Uploading', x)
for i in range(5): # for i in range(5):
try: # try:
check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x, # check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x,
'root@%s:%s'%(server, rdir)]) # 'root@%s:%s'%(server, rdir)])
except KeyboardInterrupt: # except KeyboardInterrupt:
raise SystemExit(1) # raise SystemExit(1)
except: # except:
print ('\nUpload failed, trying again in 30 seconds') # print ('\nUpload failed, trying again in 30 seconds')
time.sleep(30) # time.sleep(30)
else: # else:
break # break
print ('Uploaded in', int(time.time() - start), 'seconds\n\n') # print ('Uploaded in', int(time.time() - start), 'seconds\n\n')
#
# }}} # }}}
def upload_to_dbs(files, version): # {{{ def upload_to_dbs(files, version): # {{{