mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #855060 (calibre, version 0.8.19 ERROR: Unhandled exception: <b>AttributeError</b>:'MobileReadStore' object has no attribute 'lock' Traceback (most recent call last): File "site-packages/calibre/gui2/actions/store.py", line 130, in open_store File "site-packages/calibre/gui2/store/stores/mobileread/mobileread_plugin.py", line 40, in open File "site-packages/calibre/gui2/store/stores/mobileread/mobileread_plugin.py", line 57, in update_cache AttributeError: 'MobileReadStore' object has no attribute 'lock')
This commit is contained in:
parent
f130425da8
commit
8f16a5e02a
@ -22,7 +22,8 @@ from calibre.gui2.store.stores.mobileread.store_dialog import MobileReadStoreDia
|
|||||||
|
|
||||||
class MobileReadStore(BasicStoreConfig, StorePlugin):
|
class MobileReadStore(BasicStoreConfig, StorePlugin):
|
||||||
|
|
||||||
def genesis(self):
|
def __init__(self, *args, **kwargs):
|
||||||
|
StorePlugin.__init__(self, *args, **kwargs)
|
||||||
self.lock = Lock()
|
self.lock = Lock()
|
||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
@ -56,7 +57,8 @@ class MobileReadStore(BasicStoreConfig, StorePlugin):
|
|||||||
book.drm = SearchResult.DRM_UNLOCKED
|
book.drm = SearchResult.DRM_UNLOCKED
|
||||||
yield book
|
yield book
|
||||||
|
|
||||||
def update_cache(self, parent=None, timeout=10, force=False, suppress_progress=False):
|
def update_cache(self, parent=None, timeout=10, force=False,
|
||||||
|
suppress_progress=False):
|
||||||
if self.lock.acquire(False):
|
if self.lock.acquire(False):
|
||||||
try:
|
try:
|
||||||
update_thread = CacheUpdateThread(self.config, self.seralize_books, timeout)
|
update_thread = CacheUpdateThread(self.config, self.seralize_books, timeout)
|
||||||
|
@ -195,7 +195,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
|||||||
|
|
||||||
for ac in self.iactions.values():
|
for ac in self.iactions.values():
|
||||||
ac.do_genesis()
|
ac.do_genesis()
|
||||||
self.donate_action = QAction(QIcon(I('donate.png')), _('&Donate to support calibre'), self)
|
self.donate_action = QAction(QIcon(I('donate.png')),
|
||||||
|
_('&Donate to support calibre'), self)
|
||||||
for st in self.istores.values():
|
for st in self.istores.values():
|
||||||
st.do_genesis()
|
st.do_genesis()
|
||||||
MainWindowMixin.__init__(self, db)
|
MainWindowMixin.__init__(self, db)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user