mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
...
This commit is contained in:
parent
9d0607a896
commit
d5d0b79af3
1 changed files with 4 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import os, subprocess, hashlib, shutil, glob, stat, sys, time, urllib2, urllib
|
||||
import os, subprocess, hashlib, shutil, glob, stat, sys, time, urllib2, urllib, json
|
||||
from subprocess import check_call
|
||||
from tempfile import NamedTemporaryFile, mkdtemp, gettempdir
|
||||
from zipfile import ZipFile
|
||||
|
|
@ -137,7 +137,7 @@ def upload_to_fosshub(files=None):
|
|||
'version': __version__,
|
||||
})
|
||||
jq = {'software': 'Calibre', 'apiKey':get_fosshub_data(), 'upload':entries}
|
||||
rq = urllib2.urlopen('https://www.fosshub.com/JSTools/uploadJson', urllib.urlencode({'content':jq}))
|
||||
rq = urllib2.urlopen('https://www.fosshub.com/JSTools/uploadJson', urllib.urlencode({'content':json.dumps(jq)}))
|
||||
if rq.getcode() != 200:
|
||||
raise SystemExit('Failed to upload to fosshub, with HTTP error code: %d' % rq.getcode())
|
||||
|
||||
|
|
@ -148,6 +148,8 @@ def add_options(self, parser):
|
|||
parser.add_option('--replace', default=False, action='store_true', help='Replace existing installers')
|
||||
|
||||
def run(self, opts):
|
||||
upload_to_fosshub()
|
||||
return
|
||||
all_possible = set(installers())
|
||||
available = set(glob.glob('dist/*'))
|
||||
files = {x:installer_description(x) for x in
|
||||
|
|
|
|||
Loading…
Reference in a new issue