Merge remote-tracking branch 'upstream/master' into test_adblock

This commit is contained in:
Corentin Jule 2015-12-04 13:19:00 +01:00
commit e78f1a7412
3 changed files with 7 additions and 6 deletions

View File

@ -103,6 +103,7 @@ The following software and libraries are required to run qutebrowser:
* http://pyyaml.org/wiki/PyYAML[PyYAML]
The following libraries are optional and provide a better user experience:
* http://cthedot.de/cssutils/[cssutils]
To generate the documentation for the `:help` command, when using the git

View File

@ -30,6 +30,7 @@ import email.policy
import email.generator
import email.encoders
import email.mime.multipart
import email.message
from PyQt5.QtCore import QUrl
@ -205,11 +206,10 @@ class MHTMLWriter:
return self._create_file(root_file)
def _create_file(self, f):
"""Return the single given file as MIMEMultipart."""
msg = email.mime.multipart.MIMEMultipart()
"""Return the single given file as email.message.Message."""
msg = email.message.Message()
msg['MIME-Version'] = '1.0'
msg['Content-Location'] = f.content_location
# Get rid of the default type multipart/mixed
del msg['Content-Type']
if f.content_type:
msg.set_type(f.content_type)
msg.set_payload(f.content)
@ -475,7 +475,7 @@ def _start_download(dest, web_view):
Args:
dest: The filename where the resulting file should be saved.
win_id, tab_id: Specify the tab whose page should be loaded.
web_view: Specify the webview whose page should be loaded.
"""
loader = _Downloader(web_view, dest)
loader.run()

View File

@ -42,7 +42,7 @@ deps =
Werkzeug==0.11.2
wheel==0.26.0
xvfbwrapper==0.2.5
cherrypy==3.8.0
cherrypy==3.8.1
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests}