minor fix
This commit is contained in:
12
main.py
12
main.py
@@ -205,11 +205,6 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
|
|||||||
logger.warning('Error while fetching data from %s, retrying... (%d)', url, attempt, exc_info=e)
|
logger.warning('Error while fetching data from %s, retrying... (%d)', url, attempt, exc_info=e)
|
||||||
assert attempt < retry
|
assert attempt < retry
|
||||||
|
|
||||||
flow = ActionFlow()
|
|
||||||
profile = None
|
|
||||||
progress = { 'task': '' }
|
|
||||||
selection = 0
|
|
||||||
|
|
||||||
class Wait(Action):
|
class Wait(Action):
|
||||||
@classmethod
|
@classmethod
|
||||||
def prepare(cls):
|
def prepare(cls):
|
||||||
@@ -217,8 +212,8 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def perform(cls):
|
def perform(cls):
|
||||||
flow.do(cls)
|
|
||||||
wait(1)
|
wait(1)
|
||||||
|
return True
|
||||||
|
|
||||||
class Cancel(Action):
|
class Cancel(Action):
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -244,12 +239,17 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
|
|||||||
driver.switch_to.window(driver.current_window_handle)
|
driver.switch_to.window(driver.current_window_handle)
|
||||||
raise cls
|
raise cls
|
||||||
|
|
||||||
|
flow = ActionFlow()
|
||||||
flow.append(Wait)
|
flow.append(Wait)
|
||||||
flow.allow(Wait)
|
flow.allow(Wait)
|
||||||
flow.do(Wait)
|
flow.do(Wait)
|
||||||
flow.append(Cancel)
|
flow.append(Cancel)
|
||||||
flow.append(Skip)
|
flow.append(Skip)
|
||||||
|
|
||||||
|
profile = None
|
||||||
|
progress = { 'task': '' }
|
||||||
|
selection = 0
|
||||||
|
|
||||||
jsonrpc2.define('actions', lambda: flow.capabilities())
|
jsonrpc2.define('actions', lambda: flow.capabilities())
|
||||||
jsonrpc2.define('cancel', lambda: flow.do(Cancel))
|
jsonrpc2.define('cancel', lambda: flow.do(Cancel))
|
||||||
jsonrpc2.define('skip', lambda: flow.do(Skip))
|
jsonrpc2.define('skip', lambda: flow.do(Skip))
|
||||||
|
|||||||
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
Reference in New Issue
Block a user