mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Get Books: Fix error when using internal browser
Get Books: Fix error when using internal browser on some systems. I cannot replicate this error so my fix is speculative, based on the idea that not keeping explicit references to the python object is causing them to be garbage collected. Fixes #1191199 [Python exception downloading books from Barnes & Noble](https://bugs.launchpad.net/calibre/+bug/1191199)
This commit is contained in:
parent
b63e0df73f
commit
1bada2b35b
@ -24,8 +24,10 @@ class NPWebView(QWebView):
|
||||
self.gui = None
|
||||
self.tags = ''
|
||||
|
||||
self.setPage(NPWebPage())
|
||||
self.page().networkAccessManager().setCookieJar(QNetworkCookieJar())
|
||||
self._page = NPWebPage()
|
||||
self.setPage(self._page)
|
||||
self.cookie_jar = QNetworkCookieJar()
|
||||
self.page().networkAccessManager().setCookieJar(self.cookie_jar)
|
||||
|
||||
http_proxy = get_proxies().get('http', None)
|
||||
if http_proxy:
|
||||
|
Loading…
x
Reference in New Issue
Block a user