mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-06 14:05:21 -04:00
version 0.6.7
This commit is contained in:
@@ -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
|
||||
|
||||
+14
-15
@@ -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()
|
||||
|
||||
|
||||
|
||||
+509
-770
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+497
-759
File diff suppressed because it is too large
Load Diff
+458
-766
File diff suppressed because it is too large
Load Diff
+739
-775
File diff suppressed because it is too large
Load Diff
+823
-838
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+703
-807
File diff suppressed because it is too large
Load Diff
+729
-790
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+864
-815
File diff suppressed because it is too large
Load Diff
+606
-833
File diff suppressed because it is too large
Load Diff
+621
-797
File diff suppressed because it is too large
Load Diff
+527
-759
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+821
-836
File diff suppressed because it is too large
Load Diff
+535
-764
File diff suppressed because it is too large
Load Diff
+501
-763
File diff suppressed because it is too large
Load Diff
+1033
-1091
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+758
-823
File diff suppressed because it is too large
Load Diff
+698
-851
File diff suppressed because it is too large
Load Diff
+533
-762
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+413
-759
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
+410
-759
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user