mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Sync to trunk.
This commit is contained in:
commit
7212ede7fb
@ -84,8 +84,8 @@ class UploadToGoogleCode(Command):
|
|||||||
check_call(['scp', t.name, 'divok:'+self.GPATHS])
|
check_call(['scp', t.name, 'divok:'+self.GPATHS])
|
||||||
self.br = self.login_to_gmail()
|
self.br = self.login_to_gmail()
|
||||||
self.delete_old_files()
|
self.delete_old_files()
|
||||||
if len(self.get_files_hosted_by_google_code()) > len(installers()):
|
#if len(self.get_files_hosted_by_google_code()) > len(installers()):
|
||||||
self.warn('Some old files were not deleted from Google Code')
|
# self.warn('Some old files were not deleted from Google Code')
|
||||||
|
|
||||||
def login_to_gmail(self):
|
def login_to_gmail(self):
|
||||||
import mechanize
|
import mechanize
|
||||||
@ -98,7 +98,7 @@ class UploadToGoogleCode(Command):
|
|||||||
br.select_form(nr=0)
|
br.select_form(nr=0)
|
||||||
br.form['Email'] = self.USERNAME
|
br.form['Email'] = self.USERNAME
|
||||||
br.form['Passwd'] = pw
|
br.form['Passwd'] = pw
|
||||||
res = br.submit()
|
br.submit()
|
||||||
return br
|
return br
|
||||||
|
|
||||||
def get_files_hosted_by_google_code(self):
|
def get_files_hosted_by_google_code(self):
|
||||||
@ -121,13 +121,8 @@ class UploadToGoogleCode(Command):
|
|||||||
self.info('\tDeleting', fname)
|
self.info('\tDeleting', fname)
|
||||||
self.br.open('http://code.google.com/p/calibre-ebook/downloads/delete?name=%s'%fname)
|
self.br.open('http://code.google.com/p/calibre-ebook/downloads/delete?name=%s'%fname)
|
||||||
self.br.select_form(predicate=lambda x: 'delete.do' in x.action)
|
self.br.select_form(predicate=lambda x: 'delete.do' in x.action)
|
||||||
submit = self.br.form.find_control(name='delete')
|
self.br.form.find_control(name='delete')
|
||||||
res = self.br.submit(name='delete')
|
self.br.submit(name='delete')
|
||||||
#from calibre import ipython
|
|
||||||
#ipython({'br':self.br, 'res':res})
|
|
||||||
#return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def encode_upload_request(self, fields, file_path):
|
def encode_upload_request(self, fields, file_path):
|
||||||
BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla'
|
BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user