Handle QBuffer in on_feature_permission_requested
This commit is contained in:
parent
32a33c26a8
commit
0fef141db5
@ -319,6 +319,13 @@ class BrowserPage(QWebPage):
|
|||||||
@pyqtSlot('QWebFrame*', 'QWebPage::Feature')
|
@pyqtSlot('QWebFrame*', 'QWebPage::Feature')
|
||||||
def on_feature_permission_requested(self, frame, feature):
|
def on_feature_permission_requested(self, frame, feature):
|
||||||
"""Ask the user for approval for geolocation/notifications."""
|
"""Ask the user for approval for geolocation/notifications."""
|
||||||
|
if not isinstance(frame, QWebFrame): # pragma: no cover
|
||||||
|
# This makes no sense whatsoever, but someone reported this being
|
||||||
|
# called with a QBuffer...
|
||||||
|
log.misc.error("on_feature_permission_requested got called with "
|
||||||
|
"{!r}!".format(frame))
|
||||||
|
return
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
QWebPage.Notifications: ('content', 'notifications'),
|
QWebPage.Notifications: ('content', 'notifications'),
|
||||||
QWebPage.Geolocation: ('content', 'geolocation'),
|
QWebPage.Geolocation: ('content', 'geolocation'),
|
||||||
|
Loading…
Reference in New Issue
Block a user