Change sets to lists
This commit is contained in:
parent
bbc46d28ff
commit
0cd39ae4ff
@ -319,7 +319,7 @@ class _Downloader:
|
|||||||
Args:
|
Args:
|
||||||
url: The file to download as QUrl.
|
url: The file to download as QUrl.
|
||||||
"""
|
"""
|
||||||
if url.scheme() not in {'http', 'https'}:
|
if url.scheme() not in ['http', 'https']:
|
||||||
return
|
return
|
||||||
# Prevent loading an asset twice
|
# Prevent loading an asset twice
|
||||||
if url in self.loaded_urls:
|
if url in self.loaded_urls:
|
||||||
|
@ -300,7 +300,7 @@ class BrowserPage(QWebPage):
|
|||||||
else:
|
else:
|
||||||
reply.finished.connect(functools.partial(
|
reply.finished.connect(functools.partial(
|
||||||
self.display_content, reply, 'image/jpeg'))
|
self.display_content, reply, 'image/jpeg'))
|
||||||
elif (mimetype in {'application/pdf', 'application/x-pdf'} and
|
elif (mimetype in ['application/pdf', 'application/x-pdf'] and
|
||||||
config.get('content', 'enable-pdfjs')):
|
config.get('content', 'enable-pdfjs')):
|
||||||
# Use pdf.js to display the page
|
# Use pdf.js to display the page
|
||||||
self._show_pdfjs(reply)
|
self._show_pdfjs(reply)
|
||||||
|
Loading…
Reference in New Issue
Block a user