Disallow None-callback for dump_async
This commit is contained in:
parent
21753bc65f
commit
cd95f94ac8
@ -295,7 +295,7 @@ class AbstractTab(QWidget):
|
|||||||
def stop(self):
|
def stop(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def dump_async(self, callback=None, *, plain=False):
|
def dump_async(self, callback, *, plain=False):
|
||||||
"""Dump the current page to a file ascync.
|
"""Dump the current page to a file ascync.
|
||||||
|
|
||||||
The given callback will be called with the result when dumping is
|
The given callback will be called with the result when dumping is
|
||||||
|
@ -108,7 +108,7 @@ class WebEngineViewTab(tab.AbstractTab):
|
|||||||
def zoom_factor(self):
|
def zoom_factor(self):
|
||||||
return self._widget.zoomFactor()
|
return self._widget.zoomFactor()
|
||||||
|
|
||||||
def dump_async(self, callback=None, *, plain=False):
|
def dump_async(self, callback, *, plain=False):
|
||||||
if plain:
|
if plain:
|
||||||
self._widget.page().toPlainText(callback)
|
self._widget.page().toPlainText(callback)
|
||||||
else:
|
else:
|
||||||
|
@ -371,7 +371,7 @@ class WebViewTab(tab.AbstractTab):
|
|||||||
def load_status(self):
|
def load_status(self):
|
||||||
return self._widget.load_status
|
return self._widget.load_status
|
||||||
|
|
||||||
def dump_async(self, callback=None, *, plain=False):
|
def dump_async(self, callback, *, plain=False):
|
||||||
frame = self._widget.page().mainFrame()
|
frame = self._widget.page().mainFrame()
|
||||||
if plain:
|
if plain:
|
||||||
callback(frame.toPlainText())
|
callback(frame.toPlainText())
|
||||||
|
Loading…
Reference in New Issue
Block a user