mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
version 0.6.7
This commit is contained in:
parent
a8f065d38f
commit
0b8d4ef352
@ -2,7 +2,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
__appname__ = 'calibre'
|
||||
__version__ = '0.6.6'
|
||||
__version__ = '0.6.7'
|
||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||
|
||||
import re
|
||||
|
@ -1,27 +1,26 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import urllib, re, traceback
|
||||
import traceback
|
||||
|
||||
from PyQt4.QtCore import QThread, SIGNAL
|
||||
import mechanize
|
||||
|
||||
from calibre import __version__, __appname__
|
||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||
from calibre.constants import __version__
|
||||
from calibre import browser
|
||||
|
||||
URL = 'http://status.calibre-ebook.com/latest'
|
||||
|
||||
class CheckForUpdates(QThread):
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
src = urllib.urlopen('http://pypi.python.org/pypi/'+__appname__).read()
|
||||
soup = BeautifulSoup(src)
|
||||
meta = soup.find('link', rel='meta', title='DOAP')
|
||||
if meta:
|
||||
src = meta['href']
|
||||
match = re.search(r'version=(\S+)', src)
|
||||
if match:
|
||||
version = match.group(1)
|
||||
if version != __version__:
|
||||
self.emit(SIGNAL('update_found(PyQt_PyObject)'), version)
|
||||
br = browser()
|
||||
req = mechanize.Request(URL)
|
||||
req.add_header('CALIBRE_VERSION', __version__)
|
||||
version = br.open(req).read().strip()
|
||||
if version and version != __version__:
|
||||
self.emit(SIGNAL('update_found(PyQt_PyObject)'), version)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user